Symbolic objects
Symbolic objects
(OP)
Hi all,
How can I create a matrix of symbolic objects like
A=[a1,a2,a3,a4.........a60] using possibly an index
such as i=1:60 if possible .
Again is it possible to mix symbolic objects and numeric decimals in one matrix, such as
A=[a1,a2,a3,4,5,6,a4....]
cheers
musilj
How can I create a matrix of symbolic objects like
A=[a1,a2,a3,a4.........a60] using possibly an index
such as i=1:60 if possible .
Again is it possible to mix symbolic objects and numeric decimals in one matrix, such as
A=[a1,a2,a3,4,5,6,a4....]
cheers
musilj





RE: Symbolic objects
=====================================
Eng-tips forums: The best place on the web for engineering discussions.
RE: Symbolic objects
CODE
A(i)=sym(strcat('a',num2str(i)))
end
CODE
=====================================
Eng-tips forums: The best place on the web for engineering discussions.
RE: Symbolic objects
A quick paste into matlab of your code with the index resulted in the following error.
??? The following error occurred converting from sym to double:
Error using ==> sym.double at 25
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 ==> trial at 5
A(i)=sym(strcat('a',num2str(i)));
cheers
RE: Symbolic objects
Otherwise there must be a difference in the behavior of matlab on our machines. I have an old version Matlab 5.2
=====================================
Eng-tips forums: The best place on the web for engineering discussions.