07-02-2015 10:55 PM
Hello,
Suppose I have a 2d array(360x2) which is taken from text file and all the elements are converted to cartesian and placed in xy array and plotted as well. Now i want to rotate xy array plot with the help of slide.I am attaching 2 text files which are corresponding to theta-r array and xy array.Kindly help me with ths issue.
Solved! Go to Solution.
07-03-2015 01:42 AM - edited 07-03-2015 01:44 AM
Hi Venka,
when you already have r/theta values it becomes quite easy:
Btw:
What's the purpose of all those local variables in your BD image? Why don't you use wires and shift registers instead?
What's the purpose of that sequence structure? If you would use wires you could get rid of it…
07-03-2015 02:18 AM - edited 07-03-2015 02:28 AM
GerdW wrote:when you already have r/theta values it becomes quite easy:
You can simplify it even more (bottom of image) Same result!!
(If you also want scaling in addition to the rotation, just replace the "1" with a control. 😉
Note that you can wire the complex array directly to the xy graph. No need for clusters!
07-03-2015 02:46 AM - edited 07-03-2015 02:48 AM
Here's some very simple code. See if you can modify it for your purpose. (LV2013).
(no local variables, no sequences, no references, no clusters, no case structures, no subVIs, etc...!)
07-03-2015 06:24 AM
Hello,
I have made little modifications to ur vi. I want to check the rotation of both the graphs,but in xy graph 2 x- axis scale should be 0 to 360 but it is -180 to 180.Im a beginner kindly help me to make angles range from 0 to 360.
07-03-2015 11:41 AM - edited 07-03-2015 11:41 AM
Well, that's the way the angle of complex numbers wraps.
Why did you set r=3 by default? Just to make sure we cannot see the data? 😄
Why not keep the diagram clean and replace the bundle with "RE/IM to complex"
You shoud use Q&R to divide the angle array by 360 and use the remainder to wrap it correctly. (See picture)
07-03-2015 11:00 PM
Thank u for the solution sir....r=3 was a mistake
07-03-2015 11:11 PM
Sir if I want to get a mirror image of xy graph into a other graph what can be done? Mirror image with respect to vertical axis.
07-04-2015 12:27 AM - edited 07-04-2015 12:27 AM
Hello,
If we multiply real part with -1 and imaginary with 1 we will get mirrored complex number. Is it how its done? Or any other alternative
07-04-2015 01:08 AM
You could just go to the plot graph properties and go to the "scales" tab.. Enable the item named "inverted". It will invert the axis.