From: ahmed on 15 Jul 2010 06:12 In a m- file which have more than 700 lines using syms when run show this massage ??? The following error occurred converting from sym to double: Error using ==> mupadmex Error in MuPAD command: DOUBLE cannot convert the input expression into a double array. If the input expression contains a symbolic variable, use the VPA function instead. Error in ==> roo7y at 510 HA(1,IL)= HAI; how can i solve this error help me plz
From: Steven Lord on 15 Jul 2010 09:38 "ahmed " <amed_saleh(a)yahoo.com> wrote in message news:i1mmtk$d05$1(a)fred.mathworks.com... > In a m- file which have more than 700 lines using syms > when run show this massage > > > ??? The following error occurred converting from sym to double: > Error using ==> mupadmex > Error in MuPAD command: DOUBLE cannot convert the input expression into a > double > array. > > If the input expression contains a symbolic variable, use the VPA function > instead. > > Error in ==> roo7y at 510 > HA(1,IL)= HAI; > > > how can i solve this error > help me plz More than likely HA is a double array but HAI is a symbolic expression. If that's the case, in order to assign HAI into an element of the double array HA, MATLAB needs to convert it into a double. That error message indicates that for whatever reason, it can't do so. You need to investigate why that is. Set a breakpoint on line 510 of your code (or set an error breakpoint using the Debug menu) and look at the contents of HAI when MATLAB breaks. http://www.mathworks.com/access/helpdesk/help/techdoc/matlab_env/brqxeeu-175.html#brqxeeu-242 Two approaches to solve this problem are: Make HA a symbolic vector, so that no conversion is necessary for it to store a symbolic expression. Determine why HAI can't be converted into a double (i.e. what symbolic variable it contains) and SUBS in a value for that variable. -- Steve Lord slord(a)mathworks.com comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ To contact Technical Support use the Contact Us link on http://www.mathworks.com
From: us on 15 Jul 2010 09:49 "ahmed " <amed_saleh(a)yahoo.com> wrote in message <i1mmtk$d05$1(a)fred.mathworks.com>... > In a m- file which have more than 700 lines using syms > when run > show this massage > > > ??? The following error occurred converting from sym to double: > Error using ==> mupadmex > Error in MuPAD command: DOUBLE cannot convert the input expression into a double > array. > > If the input expression contains a symbolic variable, use the VPA function instead. > > Error in ==> roo7y at 510 > HA(1,IL)= HAI; > > > how can i solve this error > help me plz show CSSM the most frugal command, which produces this error... otherwise, CSSMers will just utter whatever assumptions they might have about possible causes - and waste everybody's time... us
|
Pages: 1 Prev: Variable name dynamically changing [really noob] Next: pid control |