Discussion Overview
The discussion revolves around saving matrices generated by a Matlab algorithm to files, specifically how to incorporate a variable into the filename during a loop. Participants explore different methods for formatting the filename based on a loop counter.
Discussion Character
Main Points Raised
- One participant inquires about saving matrices to files with filenames that include a variable from a loop, specifically asking if using a string is necessary.
- Another participant suggests using the function int2str to convert the loop counter to a string for filename creation.
- A further suggestion involves using sprintf to format the filename as "NAMEFILE-i", noting the need to check the syntax for correctness.
- Another participant provides an example of using fopen and fwrite to save a matrix as binary data, indicating that the filename can be derived from the loop counter.
- A participant expresses gratitude for the information and indicates a need to resolve how to save the matrix in the correct format.
Areas of Agreement / Disagreement
Participants appear to agree on the methods for generating filenames based on a loop counter, but there is no consensus on the best approach or format for saving the matrices.
Contextual Notes
Some participants mention checking syntax and formatting, indicating potential limitations in their proposed solutions.
Who May Find This Useful
Individuals working with Matlab who need to save generated matrices to files, particularly those interested in dynamic filename generation based on loop variables.