Error using surf (line 71) Data dimensions must agree.. How to rectify this error.
Afficher commentaires plus anciens
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')
Réponses (1)
Star Strider
le 17 Juin 2021
There are too many missing parts to run the posted code.
See if this works —
surf(t,r,T)
.
Catégories
En savoir plus sur Numerical Integration and Differentiation dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!