Filter löschen
Filter löschen

need help in solving this problem

1 Ansicht (letzte 30 Tage)
Manav Divekar
Manav Divekar am 7 Jun. 2022
Beantwortet: Walter Roberson am 7 Jun. 2022
I have a plot of z from the following equation, in this the origin is 0 for x&y. now i have to plot a new graph where the origin of is same (0) but origin of y has shifted to 2 so y value is between 2-4
x = 0:0.01:4;
y = 0:0.01:4;
z = 16.6698.*(x.*y) - 23.0641.*(x.*y);
plot(x,z)

Antworten (1)

Walter Roberson
Walter Roberson am 7 Jun. 2022
x = 0:0.01:4;
y = 0:0.01:4;
y2 = 2+y;
z = @(x,y) 16.6698.*(x.*y) - 23.0641.*(x.*y);
plot(x, z(x, y), x, z(x, y2))
Note that this code depends upon x and y being the same shape and orientation. It is not calculating for each combination of x and y, not building a surface.

Kategorien

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

Produkte


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by