Selecting a range of X values from an array

I have an .xlsx containing an array of X_values versus 6 columns of Y_ values. The X_values range from 500 to 800 units. I would like to select X_values between 630 to 700 units, and plot X_ vs Y_ for 6 different Y_ columns. I am using the following:
>> data = table2array(X_Y);
>> ind = find(data(:,1)>630);
>> x = data(ind, 1);
>> y = data(ind, 2);
>> f = fit(x,y,'gauss4');
>> figure, plot(f,x,y)
But this way I could select only the lower bound.

 채택된 답변

the cyclist
the cyclist 2018년 11월 29일

3 개 추천

ind = find(data(:,1)>630 & data(:,1)<700);

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Linear and Nonlinear Regression에 대해 자세히 알아보기

제품

질문:

2018년 11월 29일

답변:

2018년 11월 29일

Community Treasure Hunt

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

Start Hunting!

Translated by