Mat lab is only plotting one point for a linspace plot
조회 수: 4 (최근 30일)
이전 댓글 표시
The code should produce a plot of anon linear curve and I cannot figure out why its only plotting one point. Any help would be appreciated
syms r k t;
p1=1;
t1=1;
v1=(r^(1/k));
p2=((r^(1/k))/(t*(r^k)^(k-1)))^k;
t2=((r^(1/k))/(t*(r^k)^(k-1)))^(k-1);
v2=1
p3=r;
t3=t;
v3=1;
p4=1;
t4=t*(r^k)^(k-1);
v4=r^(1/k);
W=((t3-t2)/(k*t1))-((t4+t1)/t1)
diffR=diff(W,r)
nth=1-((t4-t1)/(k*(t3-t2))) %L was extracted from the solution to nth in the output script
syms off
t=4
k=1.4
r=linspace(10,200)
L=1 - (t*(r.^k).^(k - 1) - 1)/(k*(t - ((r.^(1/k).*(r.^k).^(1 - k))/t).^(k - 1)))
plot(r,L)
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Calculus에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!