How to plot with 3 inputs but 2 are steady?

6 Ansichten (letzte 30 Tage)
Niklas Kurz
Niklas Kurz am 22 Dez. 2020
Beantwortet: Mischa Kim am 23 Dez. 2020
So I've got the function f(x,y,z) = [0;0;x+1].
My attempt at plotting it results in
[x,y,z] = meshgrid(-2:0.2:2);
fx = 0; fy = 0; fz = x+1;
now
quiver3(x,y,z,fx,fy,fz)
doesn't seem to work, because the value "0" doesn't match the 41x41x41 double vector or tensor or whatever of x and y.
How I create such?

Akzeptierte Antwort

Mischa Kim
Mischa Kim am 23 Dez. 2020
Hi Niklas, use
fx = zeros(size(x)); fy = zeros(size(x)); fz = x+1;

Weitere Antworten (0)

Kategorien

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

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by