Filter löschen
Filter löschen

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

1 Ansicht (letzte 30 Tage)
Merkebu Dereje
Merkebu Dereje am 8 Jun. 2023
Beantwortet: KALYAN ACHARJYA am 8 Jun. 2023

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

Antworten (1)

KALYAN ACHARJYA
KALYAN ACHARJYA am 8 Jun. 2023
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

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by