how can i plot this

2 Ansichten (letzte 30 Tage)
jairhus matt
jairhus matt am 20 Mär. 2023
Beantwortet: Image Analyst am 20 Mär. 2023
23423423

Antworten (2)

Eric Delgado
Eric Delgado am 20 Mär. 2023
Try this...
x1 = -2*pi:.01:0;
x2 = .01:.01:2*pi;
y1 = [sin(x1).^2, sin(x2).^3];
y2 = [cos(x1).^3, cos(x2).^2];
plot([x1, x2], y1)
hold on
plot([x1, x2], y2)

Image Analyst
Image Analyst am 20 Mär. 2023
This looks like a homework problem. If you have any questions ask your instructor or read the link below to get started:
Obviously we can't give you the full solution because you're not allowed to turn in our code as your own.
Here is a start. Add the other equations over the appropriate ranges:
x = linspace(0, 2*pi, 36);
y1 = sin(x) .^ 2;
y2 = cos(x) .^ 3;
plot(x, y1, 'bo-', 'LineWidth', 2)
hold on;
grid on;
plot(x, y2, 'r*-', 'LineWidth', 2)

Kategorien

Mehr zu Mathematics finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by