Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
3D/4D Plot

Subject: 3D/4D Plot

From: Muh

Date: 3 May, 2013 07:41:09

Message: 1 of 3

I have a problem to plot 3D this matrix :
M11 = cos(t2) * cos(t3+t1)
M21 = sin(t3+t1)
M31 = sin(t2)

M21= -sin(t3+t1)
M22 = cos(T3+t1)
M23 = 0

M31= -sin(t2)
M32 =0
Could you help me?
Thank you so much
Best Regards,

Subject: 3D/4D Plot

From: Yehonatan

Date: 5 May, 2013 00:17:11

Message: 2 of 3

Which matrices do you wish to plot???

You had a mistake in your calculation : "M11 = cos(t2) * cos(t3+t1);"
Do you know the difference between (matrix * matrix) and (matrix .* matrix).
If you want to do a matrix multiplication you need there inner dimension to agree(means matrix 1 row == matrix 2 col & matrix 1 col == matrix 2 row) - using * is a matrix multiplication. If you want to multiply corresponding cells in both matrices use .*, when using this operator you need there outer dimensions to agree(means that matrix 1 row == matrix 2 row and matrix 1 col == matrix 2 col).

Subject: 3D/4D Plot

From: Yehonatan

Date: 5 May, 2013 01:08:10

Message: 3 of 3

Hello again,
If the M3 matrices is what you want to plot i'm confused. It seems that the M32 matrix that will represent the second dimension get a value of zero. So, if the second dimension does not change why would you want plot in 3d, 2d is enough. 3D plot is for elements who move in x,y and z direction, if your surface or whatever it is move only in 2 dimensions plot it as a 2d plot and not a 3d one.

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us