Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock 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
Oct 3, 2004
1
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