필터 지우기
필터 지우기

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

조회 수: 2 (최근 30일)
Merkebu Dereje
Merkebu Dereje 2023년 6월 8일
답변: 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=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