defining a variable in matlab
Mostra commenti meno recenti
V = ((pi*h^2)/3)*((3*r)-h)
plot(h,V)
??? Undefined function or variable 'h'.
Error in ==> p5_22 at 6 V = ((pi*h^2)/3)*((3*r)-h)
I'm sure this is very simple but i forgot how to tell matlab that 'h' is a variable
1 Commento
Azzi Abdelmalek
il 10 Set 2013
what is the value of h?
Risposta accettata
Più risposte (1)
Azzi Abdelmalek
il 10 Set 2013
h=0:0.1:10
r=5
V= (pi*h.^2/3).*(3*r-h)
plot(h,V)
Categorie
Scopri di più su Mathematics in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!