MATLAB Answers

0

In the ADSBSimulinkExample when I connected it to RTL-SDR Receiver I got the following error: dimension mismatch

Asked by Farros Mufid on 17 Jul 2019
Latest activity Commented on by Walter Roberson
on 14 Aug 2019
Subscripted assignment dimension mismatch: [1] ~= [0].
Error in helperAdsbNL.m (line 28)
NL(1) = find(latTable<lat,1,'first');
Error in helperAdsbRxMsgParserFun.m (line 215)
Error in helperAdsbRxMsgParserFun.m (line 43)
Error in 'ADSBSimulinkExample/Message Parser' (line 4)
Component:Stateflow | Category:Runtime error
An error occurred while running the simulation and the simulation was terminated
Caused by:
Simulation stopped because of a runtime error.

  3 Comments

There are no entries in which the lattable < lat.
I get the feeling it is due to being in the southern hemisphere. All the lats in the table are +ve. I have the same error.
The error would occur if you have any input lat which is greater than or equal to max(lattable) . In such a situation, lattable<lat is false for all entries, and find() will return empty, but emptiness cannot be stored into a scalar location NL(1)

Sign in to comment.

1 Answer

Answer by Harsha Priya Daggubati on 5 Aug 2019

Hi,
I guess, there is an error in helperAdsbNL.m file. You can dive into the cause of this error by debugging through the code using breakpoints at the suggested lines in the error message. As per my understanding it’s because there are no entries of latTable which are less than lat. Hope this helps!

  1 Comment

I get the feeling it is due to being in the southern hemisphere. All the lats in the table are +ve. I have the same error. Or am I completely on the wrong path?

Sign in to comment.