represent symbolic toolbox as a string
2 views (last 30 days)
Show older comments
I am using the symbolic toolbox in Array1. How do you represent it as a string?
syms r,theta,phi
x=r*cos(theta)*cos(phi)
y=r*sin(theta)*cos(phi)
z=r*sin(phi)
Array1=num2str([x y z])
0 Comments
Answers (1)
sixwwwwww
on 6 Dec 2013
try this:
syms r theta phi
x=r*cos(theta)*cos(phi)
y=r*sin(theta)*cos(phi)
z=r*sin(phi)
Array1 = char([x y z])
5 Comments
Walter Roberson
on 11 Dec 2013
Change
Array2(n)=char(Array1(i,j,k,l))
to
Array2{n}=char(Array1(i,j,k,l))
See Also
Categories
Find more on Numbers and Precision in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!