help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Short Cut Way to Assign the Variables x1, x2....x40 names


From: Nir Krakauer
Subject: Re: Short Cut Way to Assign the Variables x1, x2....x40 names
Date: Sat, 13 Sep 2014 15:12:00 -0400


I don't think you can do it in Fortran.

You can in Octave, though:
for i = 1:40
  eval(['x' num2str(i) ' = y' num2str(i) ' + a;'])
endfor

reply via email to

[Prev in Thread] Current Thread [Next in Thread]