Im having trouble plotting a trinomial graph, for the function y = x^3. I wrote out the function and tried the plot command but it wont work really.

Antworten (1)

Are Mjaavatten
Are Mjaavatten am 22 Feb. 2021
Bearbeitet: Are Mjaavatten am 22 Feb. 2021

0 Stimmen

fun = @(x) x^3;
fplot(fun,[-3,3])
Alternatively:
x = linspace(-3,3);
plot(x,x.^3); % Note the use of .^, for element by element operation as opposed to matrix operation
Please type
doc fplot
doc linspace
doc plot
for more details.

Kategorien

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

Produkte

Version

R2020b

Gefragt:

am 22 Feb. 2021

Bearbeitet:

am 22 Feb. 2021

Community Treasure Hunt

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

Start Hunting!

Translated by