MATLAB Answers

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

1 view (last 30 days)
Farros Mufid
Farros Mufid on 17 Jul 2019
Commented: 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

Andrew Weekes
Andrew Weekes on 14 Aug 2019
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.
Walter Roberson
Walter Roberson on 14 Aug 2019
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.

Answers (1)

Harsha Priya Daggubati
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

Andrew Weekes
Andrew Weekes on 14 Aug 2019
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.

Community Treasure Hunt

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

Start Hunting!

Translated by