Looking for a hosted bug/issue tracker? Try our hosted development tools.

Matlab

Moderators: None (Apply to moderate this forum)
Number of threads: 599
Number of posts: 1020

This Forum Only
Post New Thread

Report
Subscripted assignment dimension mismatch Posted by virtualized on 18 Nov 2009 at 6:45 AM
Hi Everyone

I have stored a few values in a structure. I am using the getfield()
function and after getting value of a single element which satisfies a
condition storing it in a variable varx

The situation is like this:
for i=1:4
for n=1:4
varx(i,:) = getfield(J,{n,1}, 'val')
end
end

The 'val' field of the structure has values in the form
j1,j2,......j15. J is the name of the structure.
I have no problem if the 'val' field has values upto 'j9'.
But when the selected value is in the range j10,.....j15
i get the following error:
??? Subscripted assignment dimension mismatch.

Any help in this regard is highly appreciated.
Regards



 
Popular resources and forums for programmers on Programmersheaven.com
Assembly, Basic, C, C#, C++, Delphi, Java, JavaScript, Pascal, Perl, PHP, Python, Ruby, Visual Basic
© Copyright 2009 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Publisher: Lars Hagelin. Read the latest words from the publisher here.
Be the first to sign up for Lars Hagelin’s In-depth Outsourcing Newsletter here.
bootstrapLabs Logo A BootstrapLabs project.