problem with plotting a 1D graph
4 次查看(过去 30 天)
显示 更早的评论
Hi,
I have solved a 2D time problem U(x,y,t), 0<=x,y<=L and 0<=t<=T, by FEM and i get
trisurf(TRI,x,y,U(:,N)) % N number of time steps
% TRI triangle for create mesh
My question is how to write Matab code to see plot 1D for U solution of this problem if I choose for example : U(5,6,t) for all 0<=t<=T and U(x,5,0.15) for 0<=x<=L.
(To simulate 1D problem through a 2D problem ) this what i try write plot but it is not correct
% plot of time : U(5,6,t)
t=linspace(0,2,0.15);
for i=1:np % np number of nodes
find(x(m)==5 & y(m)==6)
end
plot(t,U(:,t))
%%%%%%%%%%%%%
% plot of x : U(x,5,0.15)
t=0.15;
for i=1:np % np numbers of nodes
find(y(m)==5
end
plot(x,U(:,t)
Please i need help
Thanks
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Surface and Mesh Plots 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!