COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

### Finding the angle...

• Email
• Follow

```I have a line,

t=(0:30:30); % Defines t from 0 to 30 with interval of 30
x=-0.28*t.^2+6.5*t+61; % Creates array x
y=0.18*t.^2-8.5*t+65; % Creates array y
plot (x,y,'y') % Plots the two equations defined above

, and I need to find the angle from that line to the x axis. I can do this mathmatically on paper, but I don't know how to do this on matlab. I've been trying everything to find the angle, how do I go about solving this?
```
 0

See related articles to this posting

```On 5 Mar, 09:02, "Peter Kang" <proper...@yahoo.com> wrote:
> I have a line,
>
> t=(0:30:30); % Defines t from 0 to 30 with interval of 30
> x=-0.28*t.^2+6.5*t+61; % Creates array x
> y=0.18*t.^2-8.5*t+65; % Creates array y
> plot (x,y,'y') % Plots the two equations defined above
>
> , and I need to find the angle from that line to the x axis. I can do this mathmatically on paper, but I don't know how to do this on matlab. I've been trying everything to find the angle, how do I go about solving this?

How would you do this with pen and paper?

Rune
```
 0

1 Replies
267 Views

Similar Articles

12/7/2013 10:30:21 PM
page loaded in 39457 ms. (0)

Similar Artilces:

angle
Hi! How could I plot the phase diagram of the ractio between input and output signals of a dynamic system? I have tried with: PhaseX=angle(x) %input phase, where x=fft(input) PhaseY=angle(y)%output phase, where y =fft(output) PhaseDiagram=angle(y)-angle(x); plot(PhaseDiagram); but the result I have obtained is absolutely wrong. Thanks, Fab Fabrizio Forni wrote: > Hi! > How could I plot the phase diagram of the ractio between input and output > signals of a dynamic system? > I have tried with: > > PhaseX=angle(x) %input phase, where x=fft(input) > PhaseY=angle(y)%output phase, where y =fft(output) > PhaseDiagram=angle(y)-angle(x); > plot(PhaseDiagram); > > but the result I have obtained is absolutely wrong. > > Thanks, > Fab > > It could be a number of things. I assume you only care about the Phase Diagram for positive frequencies? In that case you need to keep only the first N/2 points in PhaseDiagram. Also, unless the duration of your signal is exactly 1, you probably need to define an x-axis to plot phase against something meaningful (like frequency). Understand that data point 1 represents the energy

Contact angle?
Hi there, I have an image of water droplet on a flat surface and would like to get the contact angle. Anyone has a Matlab script that doing the work? It is really appreciated for sharing the code. yeallan "yeallan Ye" <xye166@gmail.com> wrote in message <i5o4gc\$ie3\$1@fred.mathworks.com>... > Hi there, > > I have an image of water droplet on a flat surface and would like to get the contact angle. Anyone has a Matlab script that doing the work? It is really appreciated for sharing the code. > > yeallan Why don't you post an image to a free file hosting site (such as http://drop.io ) and let us look at the image? Then show us what you've tried so far. You're much more likely to get a meaningful response doing this than just putting out a sendit2me request.

redian angle
Hi, how can I write the angles with radian and with degree. for ex sin(90)~=0 , but sin(pi/2)=0 I want to give the angles with degrees, How can I make it?? thanks Kutaiba In article <26108819.1115129332560.JavaMail.jakarta@nitrogen.mathforum.org>, Kutaiba Saleh <kutaiba.saleh@stud.tu-ilmenau.de> wrote: > Hi, > how can I write the angles with radian and with degree. > for ex > sin(90)~=0 , but sin(pi/2)=0 > I want to give the angles with degrees, How can I make it?? > thanks > Kutaiba ------ Hi. Use sind, cosd, tand, etc. for angles in degrees. (Remove &q

angle, rotation, transformation
starting point http://en.wikipedia.org/wiki/Bundle_adjustment But if you already know the characteristics of your camera, and you know EXACTLY how the camera moves between the 2 views, you should have enough information to find, for each dot and each view, a 3D line on which the dot lies. The intersection of the two lines will pinpoint the dot's 3D location. Hi Thanks, The angle between two cameras is of 90 degree. could any body suggest me matlab-code for this problem? thank in advance. regard, from Image vision. "Matt J" wrote in message <jgomkp\$edr...;csphysics@yahoo.com> wrote in message news:jgongt\$hgs\$1@newscl01ah.mathworks.com... > Hi Thanks, > The angle between two cameras is of 90 degree. > could any body suggest me matlab-code for this problem? In general, I think the problem as described is impossible to solve. plot3([1 0 0 1], [1 1 0 0], [1 1 1 1], 'o'); xlabel('x'); ylabel('y'); zlabel('z'); view([90, 0]) pause view([0, 0]) In each of the views above, two of the four distinct points are concealed behind other points. We need to do something like looking from above to see all four

FFT and phase angle
Hi, If I have a chirped gaussian pulse in time domain, take FFT from it and then plot phase, I get in a way two plots. The phase points are "jumping" so that about every other point has pi more (or less) phase. If the explanation was unclear, below are a short piece of code to demonstrate it. I've used Google a lot but couldn't find help, so tips why that jumping is occurring are highly welcome. Samuli N = 8192; t = linspace(-1000,1000,N); %chirped gaussian pulse A = exp(-(1+i/10).*t.^2); A_f = fftshift(fft(A)); figure; plot(angle(A_f),'.'); plot(unwrap(angle(A_f)),'.'); should unwrap the jumps IB Samuli wrote: > > > Hi, > > If I have a chirped gaussian pulse in time domain, take FFT from it > and > then plot phase, I get in a way two plots. The phase points are > "jumping" so that about every other point has pi more (or less) > phase. > If the explanation was unclear, below are a short piece of code to > demonstrate it. > > I've used Google a lot but couldn't find help, so tips why that > jumping > is occurring are highly welcome. > > Samuli > > > N

Circular Cut at an Angle?
Hi All, I'm trying to make a circular cut across the end of a round rod, but with the cut being canted at an angle to the rod's axis. Basically I'm trying to create relatively large radius cut using a relatively small cutter. The shape of the cut is actually an ellipse when viewed at the desired angle. Still confused? This technique is used on a vertical milling machine where the end mill tool is tilted at some angle then passed across the end if the vertically mounted rod. The resut is a large radius cutout in the rod. I'm playing with a rod diameter of 1" and an end mill dia of 3/4". My problem is getting SW to move the circular cut across the rod with the two axes being something in the 45 deg range. Any ideas? TIA Dan > "Dan" : > I'm trying to make a circular cut across the end of a round rod, but > with the cut being canted at an angle to the rod's axis. Hi Dan, Make a new PLANE at an angle at the desired location. Sketch circle on this plane and do the Extruded Cut. Willem Are you looking for something like this (check Circular Cut in the file section). Deepak On Oct 21, 11:53=A0am, "Willem1" <

Fuel Spray Angle Measurement
Hello, I'm trying to automatically measure the cone angle of a fuel injector spray using the image toolbox commands in Matlab. After doing edge detection and other post-processing I have come up with a b&w picture like this http://i12.photobucket.com/albums/a234/fred_3202/bwFinal_FuelSpray.jpg I know need to automatically measure the approx. angle of the spray. What is the best way to do this ??? I was thinking about marking points where there is a transition of white to black and then plotting a line through those points. And repeat the process for the bottom half of the picture but I have no idea how to start writing the code for that or if it's even the correct way to do it. Some help would be greatly appreciated Thank u Fred, I think the answer depends on what angle you plan on measuring. In other words, you want to choose a method that will produce an angle value close to what you expect. It seems like fitting two straight lines to the image is a reasonable idea though. "Fred Vrancken" <fred_3202@hotmail.com> wrote in message <i3bar9\$a94\$1@fred.mathworks.com>... > Hello, > > I'm trying

how to find the angle
hi there i want to know how to make the system find the angles of a shape (for example Rectangle).. i`m still a begginer in matlab i need a help