Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to use pcolor in matlab in this example?

433 views
Skip to first unread message

Sprinceana

unread,
Aug 7, 2009, 4:04:01 AM8/7/09
to
>> x=[1 2; 0 1] % defining 3 matrix

x =

1 2
0 1

>> y=[1 0; 0 1]

y =

1 0
0 1

>> z=[ 2 2 ; 1 1]

z =

2 2
1 1

>> mesh(x,y,z) % 3D graph with mesh for the 3 matrix (x,y and z)
>> k=1:1:100 % we want to plot the curves z=k with k integer number on the plane (x,y)


>> contour(x,y,z,[k])

My question is how can I use pcolor for my 3 matrix?

I tried :

>> pcolor(x,y,z)

I receive this error:

??? Attempt to execute SCRIPT surface as a function.

Error in ==> pcolor at 76
hh = surface(x,y,zeros(size(c)),c,'parent',cax);

us

unread,
Aug 7, 2009, 8:41:03 AM8/7/09
to
"Sprinceana "
> >> pcolor(x,y,z)
> I receive this error:
> ??? Attempt to execute SCRIPT surface as a function.
> Error in ==> pcolor at 76
> hh = surface(x,y,zeros(size(c)),c,'parent',cax);

a hint:
- it seems you have a proprietary SURFACE function somewhere sitting around...

which surface -all;
% should show you the built-in

us

Sprinceana

unread,
Aug 7, 2009, 12:24:02 PM8/7/09
to
Thanks us!
0 new messages