LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.charting
Banaticus
 
Posts: n/a
Default Visually add (graph) vectors


I'd like to visually add (graph) vectors, up to three of them. I'd
prefer to simply add them as polar coordinates, although I can easily
convert them to rectangular coordinates. I'd like Excel to graph one
vector after another, adding the tail of each vector to the head of the
previous vector (or the origin). At the end, I'd like Excel to draw a
vector from the origin of the graph to the head of the last vector and
give the resulting polar coordinates (converting as required). In the
following table I show how I'd like to format the initial polar
coordinates -- it also shows the calculated x/y end points for the same
line stretching from the origin. I have four vectors in this sample
table just so that I can check my x,y calculations.

Code:
--------------------
Vectors
Mag Angle Ref Ang x y
100 50 50 64.2788 76.6044
150 170 10 -147.7212 26.0472
50 185 5 -49.8097 -4.3578
50 275 85 4.3578 -49.8097
--------------------


The code for the Ref Angle on the first line is:
=IF(B3<90,B3,IF(B3<=180,180-B3,IF(B3<=270,B3-180,IF(B3<=360,360-B3,"ERR"))))

The code for x on the first line is:
=IF(OR(B3<90,B3270),ROUND(A3*COS(RADIANS(C3)),4), ROUND(A3*COS(RADIANS(C3))*-1,4))

The code for y on the first line is:
=IF(B3<180,ROUND(A3*SIN(RADIANS(C3)),4),ROUND(A3*S IN(RADIANS(C3))*-1,4))


--
Banaticus
------------------------------------------------------------------------
Banaticus's Profile: http://www.excelforum.com/member.php...o&userid=35795
View this thread: http://www.excelforum.com/showthread...hreadid=555681

 
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
Bar graph and line graph overlayed MikeR-Oz Charts and Charting in Excel 4 February 6th 06 07:01 AM
Dynamic Range with unused formula messing up x axis on dynamic graph [email protected] Charts and Charting in Excel 2 February 2nd 06 08:02 PM
Hyperlinkage of one graph with another graph or Drill down graph Sanjay Kumar Singh Charts and Charting in Excel 1 January 3rd 06 12:22 PM
How do I create a combination graph with stackedColumns+lineGraph ChartQuestion Charts and Charting in Excel 1 June 14th 05 12:39 PM
Graph Axes Robin Excel Discussion (Misc queries) 0 December 8th 04 08:03 PM


All times are GMT +1. The time now is 04:49 PM.

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

About Us

"It's about Microsoft Excel"