Filter löschen
Filter löschen

How do I fix this error? If I put x/number it works.

1 Ansicht (letzte 30 Tage)
Elizabeth Browne
Elizabeth Browne am 26 Sep. 2018
Kommentiert: Elizabeth Browne am 27 Sep. 2018
clear all
close all
clc
figure
X = 200:250:2500;
Y = 1.82*10^14*exp(-38370/X);
plot(X,Y)
Error in Plot_MECH558_HW3Q2 (line 7)
Y = 1.82*10^14*exp(-38370/X);

Akzeptierte Antwort

Bish Erbas
Bish Erbas am 26 Sep. 2018
figure; X = 200:250:2500; Y = 1.82*10^14*exp(-38370./X); plot(X,Y)
When you want to multiply or divide every element of a vector, you will need to use . before the / or * operator. Above line works for me.

Weitere Antworten (0)

Kategorien

Mehr zu Multidimensional Arrays finden Sie in Help Center und File Exchange

Produkte


Version

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by