3 d plot for the symbolic calculation
2 ビュー (過去 30 日間)
古いコメントを表示
syms x a t
f=1
U=zeros(1,2,'sym');
A=zeros(1,2,'sym');
B=zeros(1,2,'sym');
series(x,t)=sym(zeros(1,1));
U(1)=(r-1)/((1+exp(x))^2);
for k=1:2
A(1)=0;
for i=1:k
A(1)=A(1)+U(i)*U(k-i+1) ;
end
U(k+1)=simplify(gamma((f*(k-1)+1))/gamma((f*(k)+1))*(diff(U(k),x,2)+6*U(k)-6*A(1)));
end
disp (U)
for k=1:2
series(x,t)=series(x,t)+U(k)*(power(t,k-1));
end
series
row=0;
x=0.7;
series1(r,t)=series(0.7,t)
for r=1:5
row=row+1;
col=0;
e=(r)/10;
for t=1:5
col=col+1;
f=(t);
C(row,col)=series1(e,f);
end
end
t= vpa(C,15)
fsurf(series1,[0.1 0.1 0.5],[1 1 5])
what is correct syntax to plot 3D command ? fsurf(series1,[0.1 0.1 0.5],[1 1 5]) is showing error.
0 件のコメント
回答 (1 件)
Star Strider
2022 年 11 月 15 日
The problem was with the fsurf call (and ‘r’ was not defined).
This changed version:
fsurf(series1,[-50 50 0 50])
works —
syms x a t r
f=1
U=zeros(1,2,'sym');
A=zeros(1,2,'sym');
B=zeros(1,2,'sym');
series(x,t)=sym(zeros(1,1));
U(1)=(r-1)/((1+exp(x))^2);
for k=1:2
A(1)=0;
for i=1:k
A(1)=A(1)+U(i)*U(k-i+1) ;
end
U(k+1)=simplify(gamma((f*(k-1)+1))/gamma((f*(k)+1))*(diff(U(k),x,2)+6*U(k)-6*A(1)));
end
disp (U)
for k=1:2
series(x,t)=series(x,t)+U(k)*(power(t,k-1));
end
series
row=0;
x=0.7;
series1(r,t)=series(0.7,t)
for r=1:5
row=row+1;
col=0;
e=(r)/10;
for t=1:5
col=col+1;
f=(t);
C(row,col)=series1(e,f);
end
end
t= vpa(C,15)
fsurf(series1,[-50 50 0 50])
xlabel('r')
ylabel('t')
colormap(turbo)
view(120, 30)
.
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!