From: Samiran on
Hi All,

I have to form a string inside a iteration and after the iteration ends I have to replace a particular string in a file with the one just formed. Now the problem is when I am concatenating the string it is not allowing me to concat a white space at the end which needs to be added after each iteration. I think I have clearly stated the problem...can anybody please help me with this?

Regards
Samiran
From: Samiran on
Previously I posted one post related to this, that time I got lucky to use sprintf and got rid of the problem...but now I am not sure how I can use sprintf.
From: Jan Simon on
Dear Samiran!

> I have to form a string inside a iteration and after the iteration ends I have to replace a particular string in a file with the one just formed. Now the problem is when I am concatenating the string it is not allowing me to concat a white space at the end which needs to be added after each iteration. I think I have clearly stated the problem...

No, you haven't. You did not tell us, how you perform the concatenation.
E.g. this fails:
strcat('trailing space ', {'FULL'});
This conserve the space:
strcat({'trailing space '}, {'FULL'});
This also:
cat(2, 'trailing space ', 'FULL');

Please post the important detail.
Kind regards, Jan
From: Samiran on
I got my answer. It worked the way you suggested. Lot of thanks!!!!! :)

Regards
Samiran
From: us on
Samiran <samiran.dam(a)gmail.com> wrote in message <1174857504.328743.1267885213981.JavaMail.root(a)gallium.mathforum.org>...
> Previously I posted one post related to this, that time I got lucky to use sprintf and got rid of the problem...but now I am not sure how I can use sprintf.

as you were told -many a times- by now
read the documentation(!)...

help sprintf;
doc sprintf;

there is no need for you to get -lucky-(!)...
you must educate yourself(!)...

us