How to extract the data (y-axis) for a given value ( x-value)?

6 ビュー (過去 30 日間)
Sumit Saha
Sumit Saha 2021 年 5 月 3 日
コメント済み: KSSV 2021 年 5 月 4 日
In this IDA_Plot_CLUSTER_UPDATED.mat file, I'm able to plot the (Figure B) upto certain points. But I want to get the exact pattern of that part i.e. in each curve (figure B) after the end point it will be extended upto 0.08 in a constant pattern. In this same plot, I want to get the y-values of corresponding to certain value of x.
Note : Limit y-values
PGA_Scale = [0.1:0.1:5];
figure(21) % to plot figure B
for tt = 1:60
plot(MIDR(tt,:),PGA_EQ(tt,1)*PGA_Scale,'-*r','linewidth',0.5);hold on;
end
xlabel('Maximum Storey Drift Ratio (MSDR)')
ylabel('IM (PGA)')
title('Incremental Dynamic Analysis (IDAs)for GMSetAll')
set(gcf,'position',[ 146 378 858 779])
set(findall(gcf,'-property','Fontsize'),'Fontsize',12)
print('DT2100','-dpng','-r300');
Figure A
Figure B
Desire_Limit_Collapse = 0.01; % values to be calculated from the graph corresponding this Desire_Limit_Collapse
for ii= 1:60
IM_Collapse_find(ii)= interp1(MIDR(ii,:),PGA_EQ(ii,1)*PGA_Scale,Desire_Limit_Collapse);
end

採用された回答

KSSV
KSSV 2021 年 5 月 4 日
load('IDA_Plot_CLUSTER_UPDATED.mat')
PGA_Scale = [0.1:0.1:5];
figure(1) % to plot figure B
% for tt = 1:60
% plot(MIDR(tt,:),PGA_EQ(tt,1)*PGA_Scale,'-*r','linewidth',0.5);hold on;
% end
plot(MIDR',PGA_EQ'.*PGA_Scale','-*r','linewidth',0.5);
xlabel('Maximum Storey Drift Ratio (MSDR)')
ylabel('IM (PGA)')
title('Incremental Dynamic Analysis (IDAs)for GMSetAll')
set(findall(gcf,'-property','Fontsize'),'Fontsize',12)
print('DT2100','-dpng','-r300');
% Extend the plot
figure(2)
xi = linspace(0,0.08,100) ;
for tt = 1:60
yi = interp1(MIDR(tt,:),PGA_EQ(tt,1)*PGA_Scale,xi,'nearest','extrap') ;
plot(xi,yi,'-*r','linewidth',0.5);hold on;
end
  7 件のコメント
Sumit Saha
Sumit Saha 2021 年 5 月 4 日
編集済み: Sumit Saha 2021 年 5 月 4 日
@KSSV I want to interpolate data from the extended plot Kindly help me. In figure A, the way it had been shown.
KSSV
KSSV 2021 年 5 月 4 日
For extended plot too use interp1 with extrapolation on. This already I have shown/ given in the answer.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSmoothing についてさらに検索

製品


リリース

R2017b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by