represent symbolic toolbox as a string

2 visualizzazioni (ultimi 30 giorni)
Philosophaie
Philosophaie il 6 Dic 2013
Commentato: Walter Roberson il 11 Dic 2013
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])

Risposte (1)

sixwwwwww
sixwwwwww il 6 Dic 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 Commenti
Walter Roberson
Walter Roberson il 11 Dic 2013
Change
Array2(n)=char(Array1(i,j,k,l))
to
Array2{n}=char(Array1(i,j,k,l))

Accedi per commentare.

Categorie

Scopri di più su Symbolic Math Toolbox in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by