Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.charting
Rbp9ad
 
Posts: n/a
Default Plot the sin curve along the line y=x

This is more of a math question than a charting one. I am trying to plot the
sin curve rotated by 45 degrees. I started by plotting points for the
equation y = x + sin(x). This resulted in a skewing of
the curve. I want the sin curve to be determined by the distance traveled
along and symmetrical around the line y = x.


  #2   Report Post  
Posted to microsoft.public.excel.charting
Tushar Mehta
 
Posts: n/a
Default Plot the sin curve along the line y=x

One way of interpreting what you wrote is to plot y=x*sin(x). For the
rotation bit see
Case Study =3F Rotate and mirror image charts
http://www.tushar-mehta.com/excel/ti...0invert%20and%
20rotate.pdf

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article ,
says...
This is more of a math question than a charting one. I am trying to plot the
sin curve rotated by 45 degrees. I started by plotting points for the
equation y = x + sin(x). This resulted in a skewing of
the curve. I want the sin curve to be determined by the distance traveled
along and symmetrical around the line y = x.



  #3   Report Post  
Posted to microsoft.public.excel.charting
Bernard Liengme
 
Posts: n/a
Default Plot the sin curve along the line y=x

Let's do it all in radians
Row 1: A1 blank, B1:'Radian',, C1:'Sin'
A2:A102: 0, 0.2, 0.4.... 2.0 (use Fill to get this)
B2: =SIN(A2) and copy down to B102

Now we need the transformation; stolen from website
http://www.bookrags.com/sciences/mat...s-mmat-04.html
R(x, y) = [xcos(t) - ysin(t)], [xsin(t) + ycos(t)]. If t is positive, the
direction of the rotation is counterclockwise; if t is negative, then the
rotation is clockwise

In D1 enter =SIN(RADIANS(45)) and since SIN(45)=COS(45) we will use this for
both
In E1: 'x-value'; F1: 'y-value'
In E2: =B2*$D$1-C2*$D$1 and in F2: =B2*$D$1+C2*$D$1
Copy down to row 102

Make graph using E1:F102
Add a 45degree line if needed

File to OP by private posting
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"Rbp9ad" wrote in message
...
This is more of a math question than a charting one. I am trying to plot
the sin curve rotated by 45 degrees. I started by plotting points for the
equation y = x + sin(x). This resulted in a skewing of
the curve. I want the sin curve to be determined by the distance traveled
along and symmetrical around the line y = x.



  #4   Report Post  
Posted to microsoft.public.excel.charting
B. R.Ramachandran
 
Posts: n/a
Default Plot the sin curve along the line y=x

Hi,

Let's assume that angles (in radians) are in A2:A101, and their sine values
are in B2:B101, and the angle (in degrees) by which you want to 'rotate' the
sine plot is in E1 (in your example, 45 degrees). Convert that angle into
radians in F1, with the formula =E1*PI()/180.
You are going to create two new columns, C2:C101 and D2:D101. If A2=0 (and
therefore B2=0), enter zeros in C2 and D2. In C3 and D3 enter the following
formulas, and autofill down to C101 and D101.

In C3, =SQRT(A3^2+B3^2)*COS(ATAN(B3/A3)+$F$1)
In D3, =SQRT(A3^2+B3^2)*SIN(ATAN(B3/A3)+$F$1)

Make a plot of D2:D101 (y-values vs C2:C101 (x-values).

You can change the angle of rotation in whatever value you want, and the
sine curve would automatically 'tilt' to that angle.

If you want to show the 'tilted' axis of the sine curve on the graph, enter
zeros in E2 and F2. Enter a number such as 20 in G2 (This is just a scaling
factor).
In E3, =$G$2*COS($F$1)
IN F3, =$G$2*SIN($F$1)

Add a series to your graph with F2:F3 (Y-values) vs E2:E3 (x-values). You
can adjust the length of that line by changing the number in G2.

Regards,
B. R. Ramachandran


"Rbp9ad" wrote:

This is more of a math question than a charting one. I am trying to plot the
sin curve rotated by 45 degrees. I started by plotting points for the
equation y = x + sin(x). This resulted in a skewing of
the curve. I want the sin curve to be determined by the distance traveled
along and symmetrical around the line y = x.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I get Excel to determine the line curve formula without graph. Cadelima Excel Discussion (Misc queries) 8 December 20th 05 10:57 PM
Line Graphs - How do I plot N/As? duncanm Charts and Charting in Excel 1 September 15th 05 06:19 PM
Scatter plot and line graph combination Tim Gilderseeve Charts and Charting in Excel 2 June 11th 05 07:53 AM
Can you plot individual numbers on a bell curve in excel, and how. RJC Excel Discussion (Misc queries) 1 February 28th 05 10:07 PM
Plot a line? Set dymanic axis Max min Stan Altshuller Charts and Charting in Excel 3 December 9th 04 09:04 PM


All times are GMT +1. The time now is 09:15 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"