MATLAB Answers

Error in 'From Spreadsheet ' Block in Simulink

8 views (last 30 days)
DARSHAN N KANNUR
DARSHAN N KANNUR on 1 Jun 2020
Edited: Rik on 5 Aug 2020
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.

  0 Comments

Sign in to comment.

Answers (1)

Sugar Daddy
Sugar Daddy on 1 Jun 2020
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 Comments

Show 6 older comments
DARSHAN N KANNUR
DARSHAN N KANNUR on 3 Jun 2020
when i changed the name of the sheet to sheet2, again the same type of problem block with so many ports.like i have mentioned in the first doubt.
Sugar Daddy
Sugar Daddy on 4 Jun 2020
please attach the sheet if possible
DARSHAN N KANNUR
DARSHAN N KANNUR on 9 Jun 2020
Hello sir I have attached the excel sheet. Do check it.
Edit Rik:
Moved attachment from separate answer to this comment.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!