Dot indexing is not supported for variables of this type.

4 Ansichten (letzte 30 Tage)
Sateesh Kandukuri
Sateesh Kandukuri am 14 Okt. 2020
Kommentiert: Walter Roberson am 15 Okt. 2020
Error in ferroskyrPos (line 36);
  3 Kommentare
Sateesh Kandukuri
Sateesh Kandukuri am 14 Okt. 2020
Dear Sudhakar Shinde,
I am a novice to Matlab, I am still in the learning stage. Could you please resolve the error?

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Bjorn Gustavsson
Bjorn Gustavsson am 14 Okt. 2020
When you get a problem like this it is because the variable is not of a struct as you expect. In general you can add a line with something like this:
whos A
just after your importdata-call. That will tell you what the variable is.
Another thing to do is to set a debug-stop like this:
dbstop if error
and rerun your script/function, then matlab will stop at the point of error, giving you access to the workspace where the error occured, so that you can have a look at the variables with interactive keyboard commands, you can even step up and down in the call-stack to
investigate how you ended up where you ended up. (This is a necessary skill to learn, not a funny one to do, but as someone said "to err is human"...)
  8 Kommentare

Melden Sie sich an, um zu kommentieren.


Mehr zu Low-Level File I/O finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by