
From:  Huub van Niekerk 
Subject:  Re: printing mesh with unequal ranges 
Date:  Fri, 1 Apr 2011 16:05:30 +0200 
Is this what you'd like to do?On Apr 1, 2011, at 8:20 AM, Huub van Niekerk wrote:
> Hi,
>
> I'm trying to plot a function along a meshgrid using x = 0 : 6 and y = 0 : 10, and e.g. function f = 2 * x * sin(2*pi*y) + 4 * x * cos(2*pi*y)
> I'm getting the error that the matrix A^b must be square. I understand that, but then how can I get what I want? Reading the documentation it only deals with 1 variable in the function. Can somebody please tell me what mistake I make?
>
> Thanks
x = 0 : 0.1 : 6;
y = 0 : 0.1 : 10;
[x, y] = meshgrid (x, y);
f = 2 * x .* sin(2*pi*y) + 4 * x .* cos(2*pi*y);
mesh (x,y,f)
Notice the use of ".*" instead of "*"
[Prev in Thread]  Current Thread  [Next in Thread] 