Error using surf (line 71) Data dimensions must agree.. How to rectify this error.
이전 댓글 표시
tspan = [t_sr t_ss];
y=zeros(2,m);
y0 = [T_amb(1); T_amb(1)];
[t,y] = ode15s(@(t,y) odefcn(t,y,T_amb), tspan, y0);
figure
plot(t,y(:,1),'o',t,y(:,2),'+')
ylabel('temperature(oC)');
xlabel('time in decimal(s)');
Tp=y(:,2);
t1 =linspace(20580,59520,5);
r=linspace(0.0005,0.01,5);
ul = Tp(1);
ur = Tp(48);
m =1;
sol = pdepe(m,@pdex1pde,@pdex1ic,@pdex1bc,t1,r);
T = sol(:,:,1);
surf(r,t,T)
title('Numerical solution computed with 20 mesh points')
xlabel('Radius r')
ylabel('Time t')
답변 (1개)
Star Strider
2021년 6월 17일
There are too many missing parts to run the posted code.
See if this works —
surf(t,r,T)
.
카테고리
도움말 센터 및 File Exchange에서 Numerical Integration and Differentiation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!