image of a two variable function in Matlab

99 Views Asked by At

Could anyone tell me how to plot the image of the following function in a two-dimensional plane in Matlab (R2018b) by possibly a Matlab code or command? I mean I want to see a curve in $\mathbb R^2$ for say, $x\in [-10,10],y\in[-10,10]$. I also don't know how to write such a function in Matlab too.

$$f\left(\begin{bmatrix}x\\y\end{bmatrix}\right)=\begin{bmatrix}5&-0.5\\3&5\end{bmatrix}\begin{bmatrix}x\\y\end{bmatrix}+\begin{bmatrix}8\\34\end{bmatrix}$$

Will it be something like this?

x=-10:10; 
y=-10:10;
[X,Y]=meshgrid(x,y);
Z=something
pcolor(X,Y,Z);
shading interp
axis('equal','square','off')
1

There are 1 best solutions below

4
On BEST ANSWER

The OP didn't ask for "vector fields" but that is precisely what the output is: a vector field.

The discussion of "compact set" is entirely irrelevant.

The input is a vector (position) and the output is a vector:

$$f(x,y) = (5 x - y/2 + 8, 3 x + 5 y + 34)$$

enter image description here

In Mathematica:

f[x_, y_] := {5 x - y/2 + 8, 3 x + 5 y + 34};
VectorPlot[f[x, y], {x, -10, 10}, {y, -10, 10}]