how can I write this exponential function and plot it in matlab?

조회 수: 2 (최근 30일)
G G
G G 2021년 6월 28일
댓글: G G 2021년 6월 28일
I want to write this function in matlab,but always wrong.
y=[(-14)*e^( -1500*x )]+[26*e^(-20000*x)]
I written as
y=(-14)*exp.^( -1500*x )+26*exp^(-20000*x)
I don't know where was wrong.
and I want to plot this function.
  댓글 수: 4
KSSV
KSSV 2021년 6월 28일
Show us your complete attempt.
G G
G G 2021년 6월 28일
편집: G G 2021년 6월 28일
Hi K ,this is my complete attempt.
y=(-14)*exp(-1500*x )+26*exp(-20000*x)
plot(x,y)

댓글을 달려면 로그인하십시오.

채택된 답변

Mathieu NOE
Mathieu NOE 2021년 6월 28일
hello
don't forget to define x if you want an output :
x = linspace(0,0.005,500);
y=(-14)*exp(-1500*x )+26*exp(-20000*x);
plot(x,y);

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Numerical Integration and Differentiation에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by