using .csv files with Matlab

조회 수: 2 (최근 30일)
Alex
Alex 2012년 1월 30일
Say I have an array in a .csv file like this:
a,b,c,d,e,f
20,1,10,100,1000,100
21,2,20,200,2000,200
22,3,30,300,3000,300
23,4,40,400,4000,400
24,5,50,500,5000,500
25,6,60,600,6000,600
and I want to solve this set of equations for g, h, and k:
f(a)=((((b-c)*g)/((d-e)*h))^f)+k
f(a+1)=((((b-c)*g)/((d-e)*h))^f)+k
f(a+2)=((((b-c)*g)/((d-e)*h))^f)+k
for the data in the first three rows, and then for the data in the second three rows and to repeat the process for n number of rows. I don't know how to call data from a .csv like that. Any tips?
Thanks.

답변 (1개)

Ken Atwell
Ken Atwell 2012년 1월 30일
Look into csvread and xlsread, they should be able to get the data imported into MATLAB.
  댓글 수: 1
Alex
Alex 2012년 1월 30일
Yeah, these commands are easy enough to understand now that I've read up on them, thanks. Would you have any advice for creating the system I described above, with the data entry occuring for every three lines?

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

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by