How to plot with 3 inputs but 2 are steady?

조회 수: 1 (최근 30일)
Niklas Kurz
Niklas Kurz 2020년 12월 22일
답변: Mischa Kim 2020년 12월 23일
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?

채택된 답변

Mischa Kim
Mischa Kim 2020년 12월 23일
Hi Niklas, use
fx = zeros(size(x)); fy = zeros(size(x)); fz = x+1;

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by