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

Learn moreOpportunities for recent engineering grads.

Apply TodayTo resolve issues starting MATLAB on Mac OS X 10.10 (Yosemite) visit: http://www.mathworks.com/matlabcentral/answers/159016

Asked by Juhani on 29 Mar 2013

Hi, I have 3 sets of discrete data from an airjet experiment, which roughly form velocity profiles when plotted: http://oi47.tinypic.com/i1b0v5.jpg

I now want form a solid/surface of rotation about y=0 for that graph (rotated only 180deg), and a 3D plot of it. How do I do that?

I've tried the cylinder function, but how do I change the axis of rotation and how can I tell it to 'only rotate through 180 degrees, not 360'?

*No products are associated with this question.*

Answer by Doug Hull on 29 Mar 2013

The profile you give represents the radius. Set it to whatever you want. Then you can translate the surface by adding a constant in each direction.

As for rotating only partial, you could filter the data that comes out of cylinder, throwing out the parts you do not want.

Answer by Kiran Sagar on 29 Mar 2013

First of all your velocity profile is not symmetric about y=0, so if you rotate that graph by 180, you will not get a closed surface of rotation. Technically, it should not be called as a surface of rotation.

If you have velocity data in one plane only, then it is better not to represent the same profile over the whole angular domain (in 3D).

But if you have velocity profile in different planes, then you can use the "sftool" to get the best 3D fit of the points. More the no of planes, better will be the fit.

Juhani on 30 Mar 2013

Yeah I realise the data is very limiting and asymmetric but that's kinda the point I want to make with the plots. And no I don't have profiles in other planes, which is why I want to do a rotation. Come to think of it, I want to rotate it +/-90 degrees either side of the plane as it's a profile in a vertical plane.

Is there a way to specify the axis of rotation and the angle of rotation in the cylinder function?

## 0 Comments