Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'ReplacePart inside While function' topicStudent Support Forum > General > "ReplacePart inside While function"

Next Comment >Help | Reply To Topic
Author Comment/Response
Alejandro
03/27/12 09:22am

Hello All!

My question: why does ReplacePart don't work inside While?

An example:

n=3
mat=ConstantArray[0,n]
j=0; While[j<n, ReplacePart[mat,j+1->j+1]; j++];

Any ideas?

Thank you so much!

URL: ,

Subject (listing for 'ReplacePart inside While function')
Author Date Posted
ReplacePart inside While function Alejandro 03/27/12 09:22am
Re: ReplacePart inside While function Bill Simpson 03/27/12 2:23pm
Re: Re: ReplacePart inside While function Alejandro 03/28/12 01:29am
Next Comment >Help | Reply To Topic