Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Matlab code: I have two vectors like X=[ 0 1 2 3]; y=[ 0 1 2 3]; [X,Y]=meshgrid(x,y); Z=[ -1 2 3 4, -4 5

Matlab code:

I have two vectors like

X=[ 0 1 2 3];

y=[ 0 1 2 3];

[X,Y]=meshgrid(x,y);

Z=[ -1 2 3 4, -4 5 6 7; 4 -5 -6 3; 1 2 -3 4];

surf(X,Y,Z);

view(2);

I would like to plot the positive values of Z using red points and negative values of Z using blue points.

maybe we can add in the code If Z>0 we plot the point using red color and if Z<0 we plot the point using blue color But how Can I code these previous lines, so that I get in my figure xaxis = X y axis =Y and some blue and red points only in my figure at position defined by (X(i),Y(j))

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Programming Languages 12th International Symposium Dbpl 2009 Lyon France August 2009 Proceedings Lncs 5708

Authors: Philippa Gardner ,Floris Geerts

2009th Edition

3642037925, 978-3642037924

More Books

Students also viewed these Databases questions

Question

Explain the forces that influence how people handle conflict

Answered: 1 week ago