# Interpolating data from the graph

조회 수: 7(최근 30일)
subbu 2020년 12월 30일
댓글: subbu 2020년 12월 31일
The graph shown is plotted ductility Vs Time period of a system for four diifferent Ry . What i needed is to find the Ry s for particular ductility demand ( say 2) for the time period varying from 0 to 20 as shown in the graph. The Ry s need to find out using interpolation of the given graphs ( ie, in between the four Ry s given). can someone help with this problem?? ##### 댓글 수: 2표시숨기기 이전 댓글 수: 1
subbu 2020년 12월 30일
i am attching the files

댓글을 달려면 로그인하십시오.

### 채택된 답변

Cris LaPierre 2020년 12월 30일
Ok, since you have all the data used to create the plot, you will just use the X and Y values as inputs to the interp1 function. For example, if I wanted to interpolate the values of each curve at T(s)=7, I would add the following to the bottom of your check.m script.
% interpolate at T(s) = 7
xq=7;
yq1 = interp1(Tn,meu1,xq);
yq2 = interp1(Tn,meu2,xq);
yq4 = interp1(Tn,meu4,xq);
yq8 = interp1(Tn,meu8,xq);
% visualize on the plot
plot(xq,yq1,'^')
plot(xq,yq2,'o')
plot(xq,yq4,'d')
plot(xq,yq8,'>') ##### 댓글 수: 7표시숨기기 이전 댓글 수: 6
subbu 2020년 12월 31일
yeah i think this willl do thanks for the help

댓글을 달려면 로그인하십시오.

### Community Treasure Hunt

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

Start Hunting!