Matlab

Moderators: None (Apply to moderate this forum)
Number of threads: 1080
Number of posts: 1761

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

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



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 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.
Operated by CommunityHeaven, a BootstrapLabs company.