matlab code error help
Afficher commentaires plus anciens
x = r*cospi*cos(theta);
y = r*cospi*sin(theta);
z = r*sinpi;
r = sqrt(x^2+y^2+z^2);
theta = atan*(y/x);
pi = atan*(z/sqrt(x^2+y^2));
'r' is an unrecognized function or variable.
can you tell me how can write r?
1 commentaire
Srivardhan Gadila
le 10 Avr 2020
Clearly you haven't defined the variables r and theta and you are using them in the first three equations.
Réponses (1)
Srivardhan Gadila
le 10 Avr 2020
0 votes
As a suggestion you can refer to Symbolic Computations in MATLAB & Create Symbolic Numbers, Variables, and Expressions.
Catégories
En savoir plus sur 언어 기본 사항 dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!