how can i able to get the iteration value along page in matlab?
Info
This question is closed. Reopen it to edit or answer.
Show older comments
node_1=[2 3 4 5];
ln=length(node_1);
Node_11=zeros(1,1,ln);
iel=zeros(1,1,ln);
s=[1 1 1 1];
SS=zeros(1,1,ln);
for i=1:ln
Node_11(:,:,i)=node_1(i);
SS(:,:,i)=s(i);
end
for i=1:ln
iel(:,:,i)=SS(:,:,i):Node_11(:,:,i);
end
i want to get the value along the page ..... please help me or give me any suggestion..
9 Comments
Geoff Hayes
on 19 Jun 2014
Palash - what do you mean by page?
Note that the line
iel(:,:,i)=SS(:,:,i):Node_11(:,:,i);
fails with the Assignment has more non-singleton rhs dimensions than non-singleton subscripts error. What are you attempting to do at this line?
Geoff Hayes
on 21 Jun 2014
Edited: Geoff Hayes
on 21 Jun 2014
Palash's response which was written as an Answer as opposed to being a Comment here:
Hi Geoff Hayes - thanks for the reply...... actually i want different valu in page wise by changing iel value... i am showing you the actual code..
node_1= [2 3 4 5];
Node_11=zeros(1,1,ln);
%%for first part
for i=1:ln
Node_11(:,:,i)=node_1(i);
for iel=1:Node_11(:,:,i)
% fprintf('for element number=%d',iel);
[index]=femeldof1(iel,nnel,ndof,ipt,ln);
[k,m]=femetbeam1(CCw,IIzz,E,AA,rho,ZZo,l,GG,JJ,IIo,ln);
%[B11,D11]=Straindisptmatrix(CCw,IIzz,E,l,GG,JJ);
%[BB11]=feasmbStraindisptmatrix(BB11,B11,index);
%[DD11]=feasmblyConstitutivematrix(DD11,D11,index);
[kk]=feasmbly11(kk,k,nnel,ndof,index,ln);
[mm]=feasmbly12(mm,m,nnel,ndof,index,ln);
end
end
Actually i want page wise value by changing Node_11(:,:,i) in for loop ....is it possible???? plz help me...
Geoff Hayes
on 21 Jun 2014
Palash - please delete your answer and follow up here with a comment as Answers are reserved for answers to the question and not used as a means to continue the conversation.
Without comments in your code it is unclear as to what you are trying to do.
As well you did not answer my question which was to get some clarification on what you mean by page? In the above you are now talking about page wise. What does that mean?
palash de
on 21 Jun 2014
Geoff Hayes
on 21 Jun 2014
The Node_11 matrix is a 1x1x4 matrix (since node_1 has four elements, then ln must be 4 too). Why is defined like this rather than just as a mx1 vector? What do the singleton dimensions indicate?
Your code loops as follows: since node1=[2 3 4 5] then for the first iteration iel iterates over 1,2; the second over 1,2,3; the third over 1,2,3,4; and the fourth over 1,2,3,4,5.
Are you trying to store the data at each iteration? Are you stepping through the code and finding that it doesn't do whatever you want it to?
palash de
on 22 Jun 2014
Geoff Hayes
on 22 Jun 2014
Cool!
Image Analyst
on 22 Jun 2014
Geoff, post as an answer so you can get credit for it when he Accepts and votes for it.
Geoff Hayes
on 22 Jun 2014
Thanks, Image Analyst. I would do that but much of what I put in my comments were just questions because I didn't understand what was being asked for or what was meant by "page" or "page wise"...so nothing that would really be an answer for someone else if they were to visit this page.
Answers (0)
This question is closed.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!