Converting char to int from a field to struct file

조회 수: 1 (최근 30일)
Corrado Giuliani
Corrado Giuliani 2012년 5월 28일
Hi, i got this problem. I import from excel a file which, in excel, is divided in RawxColumns, each containing a number. The fact is, i can choose both xlsread than importdata to import the data. The former returns a nosense matrix while the latter returns a struct fileof which need to take a certain field .The problem is that every raw of that column (see the link) is a series of over thousands of number, corresponding to the XYZ of a marker, for 20 markers, sample at 120Hz for at least 60 seconds.
It wouldnt be a problem if Matlab read them as numbers, but for Matlab they are char, and convertsion trhough cell2mat doesnt work. Any suggestion?

답변 (2개)

Image Analyst
Image Analyst 2012년 5월 28일
Looks like you've specified the wrong delimeter. Try using a space.

Corrado Giuliani
Corrado Giuliani 2012년 5월 28일
It's the way i solved, but it's not the way i like, since i dont write the .xls file but it's the output of an instrument and i'm supposed to read it in Matlab without modifying it.

카테고리

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