-2

I have an array of structs. Every struct holds a set of data for one single measure. Matlab gives me an error when I try to plot this data.

Expected one output from a curly brace or dot indexing expression, but there were 361 results.

How should I rewrite my plot code?

plot(result.structArray_A(:).nonArrayValue_X, result.structArray_A(:).nonArrayValue_Y);
4

1 Answer 1

-1

I have found a solution. Simply writing the following does work, even if the syntax does look odd:

plot([result.structArray_A.nonArrayValue_X], [result.structArray_A.nonArrayValue_Y]);
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.