Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[needHELP]matlab programming

Status
Not open for further replies.

MusicMan

Member level 2
Joined
Apr 18, 2007
Messages
42
Helped
9
Reputation
18
Reaction score
4
Trophy points
1,288
Activity points
1,527
matlab beam profile

hi. i have a data of a beam profile that i simulated. i plotted it in matlab using the normal plot and i got the plot below.



now i want to plot it in 3d such that i would have a 3d profile of the beam but i don't know how i'll do it in matlab. pls help me. i need it urgently.
my data is attached below.
tnx
 

body of revolutionmatlab

I think you have something missing... for plotting 3D data you need the relation of 3 different variables, and I only see the relation between 2 variables here, so only 2D data can be drawn...

Give some more info, pls
 

cartesian mesh code in matlab

tnx.
the data i have is only 1Dimension. i am supposed to rotate the data about r=0 so that i will have basically a 3d data(body of revolution) and then plot it. but i don't know how to do it in matlab. i hope someone could help me.=)
 

mean of profile of data in matlab

Hi

This code

Phi=0:pi/10:2*pi;
Theta=-pi/2:pi/10:pi;
[PHI,THETA]=meshgrid(Phi,Theta);
r0=0.5;
R=sin(PHI).*cos(THETA)+r0; % for example
[X,Y,Z]=sph2cart(THETA,PHI,R); %get cartesian values
mesh(X,Y,Z); %display Or
surf(X,Y,Z) % colored faces

produces this plot



Hope this helps you.
Sree
 

3d data matlab plot

You have a one dimensional scalar array. So how do you expect to get a
3 Dimensional graph ?

Do you mean:
data= { (0 x^) , (f_data y^), (0 z^)}

Or do you want to rotate f_data about the x-Axis ?

If you have a 3-D array you can use the "mesh" function.

Try this

a= [f_data,f_data,f_data]; % f_data is your data in a [200x1] Array
mesh(a)
 

matlab rotate data

hi. yes i want to rotate the data about the x-axis. the result i want to get is similar to the last figure below

 

mesh of revolution + matlab + data

hi. the data i gave is axially symmetric so want to rotate it around the axis. the result i need should be something like the figure below.

 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top