How do you define a structure array?

I have a function that defines the following variables:
xmin = procPar.xmin;
tmin = procPar.tmin;
fmin = procPar.fmin;
I'm using this:
procPar.xmin = Dsifile.th{1}(37,1);
procPar.tmin = Dsifile.fh{1}(1,9);
procPar.fmin = 10;
but I'm getting an error that says "Dot indexing not supported for variables of this type"

댓글 수: 3

Kevin Holly
Kevin Holly 2021년 10월 26일
What line are you getting the error?
Does it have to do with Dsifile? Does Dsifile have both th and fh as options?
Brianna Miranda
Brianna Miranda 2021년 10월 26일
I'm getting the error on line procPar.xmin = .....
xmin, tmin and fmin are defined in a function and the procPar.xmin ones are in my main script.
The file I'm using is Dsifile and it contains th and fh which are matrices containing time and distance data. fmin is a scalar not included in the Dsifile.
The structure looks like this:
Dsifile --> th --> xmin in row 37, column 1
fh --> tmin in row 1 column 9
Walter Roberson
Walter Roberson 2021년 10월 26일
What is size(procPar) ? What is class(procPar) ?

댓글을 달려면 로그인하십시오.

답변 (1개)

Walter Roberson
Walter Roberson 2021년 10월 26일

0 개 추천

Possibly procPar already exists but is not a struct or table already.
Possibly Dsifile exists but is not a struct or table.

카테고리

도움말 센터File Exchange에서 Structures에 대해 자세히 알아보기

질문:

2021년 10월 26일

댓글:

2021년 10월 26일

Community Treasure Hunt

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

Start Hunting!

Translated by