How can I store an equation as a variable?
이전 댓글 표시
I've made a function that determines the parametric equation for a line in 3D. But now I want to plot that line using plot3. I'd like to just store the equation in one place so it's easy to access for plot3. For example I'd like to be able to do the following:
XT = t/4 + 3
YT = 3t/2 - 8
ZT = 1
plot3(XT, YT, ZT)
However, it doesn't want to store unknown variables like t in these equations. What can I do to make this work? Thanks for your time. (P.S. First time using matlab answers and I'm pretty sure I used the markup stuff wrong)
채택된 답변
추가 답변 (1개)
Walter Roberson
2011년 1월 22일
0 개 추천
You can also use symbolic variables if you have the Symbolic Toolbox.
카테고리
도움말 센터 및 File Exchange에서 Programming에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!