MATLAB Answers

0

Inconsistent Error - Undefined function 'length' for input arguments of type 'table'. Use the HEIGHT, WIDTH, or SIZE functions instead

Asked by Christopher Webb on 14 Jul 2018
Latest activity Answered by Peter Perkins
on 3 Aug 2018

Hi,

I created a model to replicate an AC Railway and I am having issues getting the correct voltage levels out when a load is applied. Therefore I have been asking my advisor at university to help and sent over the attached information:

- Full_ACRailway_System_V11_PowerFlow_V2014a (SIMULINK MODEL, CHANGED TO AN OLDER VERSION FOR COMPATABILITY WITH HER SOFTWARE) - Resistance_and_Impedance_of_Wires_Power_Flow_Edit (EXCEL SHEET FOR IMPORTING OF DATA) - My_Email (DESCRIPTIVE EMAIL OF HOW TO IMPORT DATA)

However she tried to run this and unfortunately an error message pops up that doesn't show on mine?

"Undefined function 'length' for input arguments of type 'table'. Use the HEIGHT, WIDTH, or SIZE functions instead." See attached email, Advisor_Email.

My first thought was that it was an issue with the version change however when I run it on the 2014a version no error occurs. My second was that she has accidently used a table instead of a matrix, however a different error occurs. My third though was that she hadn't highlighted all the required data, however a different error occurs.

I'm a bit stuck with figuring out what has gone wrong and she has kindly said she would help me this weekend so I would like to solve the problem so she can help me.

Could you please suggest why this error is occurring and how the problem can be solved.

Kind Regards,

Chris

  0 Comments

Sign in to comment.

Products


Release

R2014a

1 Answer

Answer by Peter Perkins
on 3 Aug 2018

The error strongly suggests that something that's expected to be a numeric vector is in fact a table. Set a breakpoint at the line that the error refers to, and work backwards from there.

  0 Comments

Sign in to comment.