how to mirror plots?
9 ビュー (過去 30 日間)
古いコメントを表示
i hv theta value as 60 and 61 each theta value has phi of 120 240 with corresponding total values.
i hv to mirror data that is phi values data from 120 to 180 should be mirrored to 180 to 240 and then its plot is plotted. aim is to get plots symmetry xaxis is phi y axis is total with respect to theta percentile plots.i hv tried with excel sheet but my data is in .tab file how to import that format file and plot from it
a=xlsread('1GHzHH.xlsx');
theta=a(:,1);
phi=a(:,2);
total=a(:,3);
figure
plot(phi,total)
% f=[1];
% pol=['HH''VV'];
%
% for i=1:size(pol)
% m=strcat(pol,'GHz')
% j=strcat(f,m) %i m trying to read file which i hv imported file name is 1GHzHH.tab
% theta=data(:,1);
% phi=data(:,2);
% total=data(:,3);
% for j=1:nume1(theta)
% for k=1:nume1(phi)
%
% end
% end
% end
0 件のコメント
回答 (1 件)
Cris LaPierre
2024 年 8 月 7 日
I'm not aware of a function for this, but it can be achieved with logical indexing and some math.
data1GHH=readtable('1GHzHH.xlsx')
ind = data1GHH.phi<=180;
data1GHH.phi(ind) = abs(data1GHH.phi(ind)-180)+180;
plot(data1GHH,"phi","total")
5 件のコメント
Cris LaPierre
2024 年 8 月 9 日
So the raw data looks like this
A=[1 2 3 4 5];
B=[0.2 0.5 0.6 0.7 0.8];
plot(B,A)
but should look like this
B= [0.2 0.5 0.6 0.5 0.2];
plot(B,A)
If I adapt the code I shared above for this example, it would look like this.
total=[1 2 3 4 5];
phi=[0.2 0.5 0.6 0.7 1]; % modifying your values so they are in fact symmetric
ind = phi>0.6;
phi(ind) = 0.6 - (phi(ind)-0.6)
plot(phi,total)
参考
カテゴリ
Help Center および File Exchange で Graphics Object Identification についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!