Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations JAE on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

saving variables in a for cicle

Status
Not open for further replies.

oceanografo

Coastal
Joined
Oct 3, 2004
Messages
1
Location
PT
How can I save variables in a for cicle.
An example:

for i=1:12
P=x(i)
save 'value(i).mat' P
end

How can I get that the file value will be altered with the value of i
Example:

for i=1 => P=1 => value1.mat
for i=2=> P=2 => value2.mat

Thanks

João

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top