How to plot a trinomial graph

1 visualización (últimos 30 días)
Owen Fernandez
Owen Fernandez el 22 de Feb. de 2021
Editada: Are Mjaavatten el 22 de Feb. de 2021
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.

Respuestas (1)

Are Mjaavatten
Are Mjaavatten el 22 de Feb. de 2021
Editada: Are Mjaavatten el 22 de Feb. de 2021
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.

Categorías

Más información sobre Line Plots en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by