Group Abstract Group Abstract

Message Boards Message Boards

0
|
5.2K Views
|
2 Replies
|
1 Total Like
View groups...
Share
Share this post:

[✓] Write to files that have different names

Posted 6 years ago
Attachments:
POSTED BY: Robert Poenaru
2 Replies
Posted 6 years ago

Hi Robert,

Instead of hardcoding the file name, you can use StringTemplate to dynamically generate the file name.

{k1, k2, k3} = {3, 4, 5};
StringTemplate["output_``_``_``.dat"][k1, k2, k3]
(* output_3_4_5.dat *)
POSTED BY: Rohit Namjoshi

Thank you. This works great!

POSTED BY: Robert Poenaru
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard