Still need help on lab question

I asked for help earlier have tried all kinds of different ways of entering and still get errors
question i have to answer is
plot the following functions. Choose intervals and axis settings that highlight the important features of the graph.
1. y = x^5 -5x^3 +4x the result I get is as follows
>> x = linspace(value1, value2, numPointsInBetween); y = x .^ 5 - 5 * x .^ 3 + 4 * x; plot(x,y,'-');
Unrecognized function or variable 'value1'.

 采纳的回答

You have to define value1, value2, and numPointsInBetween yourself. They are, respectively: the minimum x the plot shows, the maximum x the plot shows, and the number of points in the plot (like a resolution). Figuring out what these should be is part of the question ("Choose intervals and axis settings that highlight the important features of the graph."), but you might start with something like:
value1 = -2;
value2 = 2;
numPointsInBetween = 100;
x = linspace(value1, value2, numPointsInBetween);
y = x .^ 5 - 5 * x .^ 3 + 4 * x;
plot(x, y, '-');
and see what you get and make adjustments from there.

更多回答(0 个)

类别

在 帮助中心 和 File Exchange 中查找有关 RF Toolbox 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by