How to plot a trinomial graph

조회 수: 5 (최근 30일)
Owen Fernandez
Owen Fernandez . 2021년 2월 22일
편집: Are Mjaavatten . 2021년 2월 22일
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.

답변 (1개)

Are Mjaavatten
Are Mjaavatten 2021년 2월 22일
편집: Are Mjaavatten 님. 2021년 2월 22일
fun = @(x) x^3;
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.


Help CenterFile Exchange에서 Discrete Data Plots에 대해 자세히 알아보기




Community Treasure Hunt

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

Start Hunting!

Translated by