How do I polar plot an array from an imported file in matlab?
Show older comments
Hi all, I have a file containing some data, with multiple rows (Time dependent) and 4 fixed columns. I want to polar plot this data such that:
0 - 90 degrees represents column 1
91 - 180 degrees represents column 2
181 - 270 degrees represents column 3
271 - 360 degrees represents column 4
Should any of the values in the column exceed the value of 1000 it will be shown on a given radius marker on the plot
Would it be possible to actually show my data in this manner?
Here is my code:
A = csvread('Polarplottest.txt');
B = A>1000
C = all(B, 2);
C = all(B(:,[1,2,3]), 2);% PowerGrip
D = all(B(:,[1,2,4]), 2);%PowerGrip
F = all(B(:,[1,3]), 2); % PrecisionGrip(Upper)
G = all(B(:,[2,4]), 2); %PrecisionGrip(Lower)
E = cell( size(C) ); % Make a cell array to hold strings, same size as C
E(:) = {'none'}; % Fill all rows with "none" to start. Could use repmat() to create E...
E(C | D) = {'PowerGrip'};
E( F & not(C | D | G) ) = {'PrecisionGrip(Upper)'};
E( G & not(C | D | F)) = {'PrecisionGrip(Lower)'};
T = array2table(A)
T.Desc = E
Accepted Answer
More Answers (0)
Categories
Find more on Polar Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!