defining a variable in matlab
이전 댓글 표시
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
Azzi Abdelmalek
2013년 9월 10일
what is the value of h?
채택된 답변
추가 답변 (1개)
Azzi Abdelmalek
2013년 9월 10일
h=0:0.1:10
r=5
V= (pi*h.^2/3).*(3*r-h)
plot(h,V)
카테고리
도움말 센터 및 File Exchange에서 Mathematics에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!