Plotting from For Loop ODEFUN and BVP4C Initial Guess
Ältere Kommentare anzeigen
%% Thetadot(0) vs Pr
m = 0;
Prinf = 1000;
for Pr = linspace(0,Prinf,1)
solinit = bvpinit(Pr,[0 0 0 0 0.05]);
sol = bvp4c(@odefun, @odefun_bc,solinit);
xint = linspace(0,Prinf,1);
Sxint = deval(sol,xint);
figure(19)
hold on
title('HeatFlux(0) vs Pr')
xlabel('Pr')
ylabel('Heat Flux')
plot(xint,Sxint(5,1)); % plots qdot(0)
end
I'd like to plot y(5,1) across varying Pr; however it seems my initial guess is not sufficient.
4 Kommentare
Is this really what you want ?
Prinf = 1000;
linspace(0,Prinf,1)
Tony Stianchie
am 29 Apr. 2023
‘I'd like to generate a vector (0 to 1000) with n =1 incremenets’
Prinf = 1000;
xint = linspace(0,Prinf,Prinf+1)
.
Tony Stianchie
am 29 Apr. 2023
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Simscape Multibody finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

