how i can import specific rows from excel and than use that row in equations MATLAB .

조회 수: 4 (최근 30일)
hI all;
i want to import x rowfrom excel file but those values of x which is greater than 200 not all ,second how i can use this x value in equation like y=3*x+12 in matlab.

답변 (1개)

Jon
Jon 2020년 10월 5일
You can use the matlab command readmatrix to get the data in from Excel (type doc readmatrix on the command line for details)
This will return all the values in your spreadsheet, not just the ones where x > 200. However if you have now put these into a variable, let's call it x, you can get just those values using something like:
x = x(x>200)
to evaluate the expression you have just use
y = 3*x + 12
Just as you already have it written
  댓글 수: 11
Engineer Batoor khan mummand
Engineer Batoor khan mummand 2020년 10월 7일
편집: Engineer Batoor khan mummand 2020년 10월 7일
thanks walter Roberson
;\ i have four equation which is given in last comments and four unknowns but s is given in excell range is J2:J1000.
now i want to plot(x,s)
i need matlab code
thanks u so much
Engineer Batoor khan mummand
Engineer Batoor khan mummand 2020년 10월 7일
Dear Walter Roberson :
i want to solve four equations simultaneously in order to find value of x,y,m and z by putting value of s which is given in excel file range J2:J1000 and than plot it against s.
i hope you have got my point

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

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by