Error using ==> plot Error in color/linetype argument

4 次查看(过去 30 天)

s=1.34*10^-5;
mo=1.34*10^-5;
z=16.87*10^-4;
x=2.51*10^7;
k=103;
r=linspace(0,2,50);
F=vectorize(@(r)((s/r^2)*mo*exp(z)*(exp(-x*r^2))*(4*k*r*cosh(4*k*r)-sinh(4*k*r))));
plot(r,F)
??? Error using ==> plot
Error in color/linetype argument

回答(1 个)

KALYAN ACHARJYA
KALYAN ACHARJYA 2023-6-8
s=1.34*10^-5;
mo=1.34*10^-5;
z=16.87*10^-4;
x=2.51*10^7;
k=103;
r=linspace(0,2,50);
F=(s./r.^2)*mo*exp(z).*(exp(-x*r.^2)).*(exp(-x*r.^2)).*(4*k*r.*(cosh(4*k*r))-sinh(4*k*r));
plot(r,F)
Above code most values are zero, please check the typical values of the parameters again or expression?
Are you looking for fplot (function plot) with function handle, see detail
HTH

类别

Help CenterFile Exchange 中查找有关 2-D and 3-D Plots 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by