exponential function remove the error of division

help me to remove this error
X1=30;
Y1=20;
X = 0:150;
Y = Y1*exp(30/(X.^0.5));
plot(X,Y)
Error using /
Matrix dimensions must agree.

Antworten (1)

KSSV
KSSV am 6 Mai 2021

0 Stimmen

X1=30;
Y1=20;
X = 0:150;
Y = Y1*exp(30./(X.^0.5));
plot(X,Y)
Use element by element division.... ./

2 Kommentare

thank you so much
KSSV
KSSV am 6 Mai 2021
Thanks is accepting/ voting the answer. :)

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Linear Algebra finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 6 Mai 2021

Kommentiert:

am 6 Mai 2021

Community Treasure Hunt

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

Start Hunting!

Translated by