Matlab can graph a surface and in vector in R3 at the same time?

I have de following code:
clc; clear; close all;
[X,Y]=meshgrid(-2:.2:2, -1:.1:1);
Z=(1-X.^2 + Y.^2)/2;
surf(X,Y,Z);
quiver3(3,-1,0,5,3,6);
xlabel('eje x');
ylabel('eje y');
zlabel('eje z');
But I don't can see the two functions in the same graph.

Answers (1)

Time to read about the hold command.
hold on
Use it between the two plotting operations.

Tags

Asked:

on 14 Apr 2018

Answered:

on 14 Apr 2018

Community Treasure Hunt

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

Start Hunting!