Hi this is my code,
experiments(1).num = 33;experiments(1).code = 'x';experiments(1).weights = [200.34 202.45];experiments(1).height.feet = 5;experiments(1).height.inches = 6;experiments(2).num = 11;experiments(2).code = 't';experiments(2).weights = [111.45 111.11];experiments(1).height.feet = 7;experiments(1).height.inches = 2;
I get this error whenever I run it,
Unable to perform assignment because dot indexing is not supported
for variables of this type.
Error in experimentsinitialization (line 4)
experiments(1).height.feet = 5;
When I try to call height of experiments(1), I get this,
>> experiments(1).height
ans =
5 6
However, I must get something like this,
>> experiments(1).height
ans =
feet: 5
inches: 6
What should I replace? or add?
Thank you in advance!
Best Answer