Error in 'From Spreadsheet ' Block in Simulink
이전 댓글 표시

I have 4948 samples in the excel sheet with two columns, first column to be treated as time ad second column to be treated as data. But as soon I press OK after linking the spreadsheet to 'From Spreadsheet' block it results into so many ports instead of just one data port. Tried on MATLAB 2018b.
Thank You in Advance.
답변 (1개)
Sugar Daddy
2020년 6월 1일
0 개 추천
Because the sheet you are feeding is row vector (i.e. it has 1 row and 4948 columns), while MATLAB requires column vector (i.e. 4948 rows and 1 column). So take transpose of excel sheet
댓글 수: 9
DARSHAN N KANNUR
2020년 6월 1일
Sugar Daddy
2020년 6월 1일
so is the problem resolved?
DARSHAN N KANNUR
2020년 6월 2일
Sugar Daddy
2020년 6월 3일
when you select Sheet1 of test1.xlsx
you will see this

change it to Sheet2

DARSHAN N KANNUR
2020년 6월 3일
Sugar Daddy
2020년 6월 3일
open excel file vel.xlsx. what is the name of sheet? if it is Sheet1 replace Sheet1 in from spreadsheet block
For example
The file i provided has 2 sheets i.e. Sheet1 and Sheet2
Now suppose that i change the Sheet1 name in excel to My_sheet1 and now run the code
The error will occur that Sheet "Sheet1' not found.
So in such a case what should i do, i need to tell from spreadsheet block to read My_sheet1 which exists in excel and not some non existing sheet
Double click from spreadsheet block and change sheet name to the new name of your Sheet
DARSHAN N KANNUR
2020년 6월 3일
Sugar Daddy
2020년 6월 4일
please attach the sheet if possible
DARSHAN N KANNUR
2020년 6월 9일
편집: Rik
2020년 8월 5일
카테고리
도움말 센터 및 File Exchange에서 Spreadsheets에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

