|
In article <a8386a05-3dce-40c7-80ce-4a1e94f211b6@c30g2000hsa.googlegroups.com>,
<sbose27@gmail.com> wrote:
>I'm trying to render a square object in math lab using matrix values
>and am unsure on how to go about this. Is there a specific command to
>draw this easily using matrix values. For example:
>A = [-1 -1 1 1; -1 1 1 -1]
> -1 -1 1 1
> -1 1 1 -1
>Is there a command to map each vector as a corner point for a square
>in a graph.
If you only have the four points, then you will need to use patch().
If you close the square yourself (repeat the original point at the
end so it knows to draw back to the origin) then you can use plot()
or line().
> If this square can be generated is there a way to view
>multiple squares in the same graph?
Yes. patch() and line() do not erase the current plot. plot()
allows you to list several coordinate lists in the same call, and
you can always use 'hold on' and make several plot() calls.
--
"Okay, buzzwords only. Two syllables, tops." -- Laurie Anderson
|