I have to represent this function: c = y * sin(x) using mesh. Where:
x = -10:10
y = 0:3:30
My code looks like this:
[X,Y] = meshgrid(x,y);
C = Y*sin(X)';
mesh(X,Y,C);
But when I run it I get the following error:
"Error using mesh (line 71) Data dimensions must agree.".
How do I fix this? I'm not sure how to plot a function where the variables are multiplied.