Matlab: String variables to fopen()

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 5K views
Eren10
Messages
17
Reaction score
0
HI

can't I pass the path of a file as a string variable to fopen() , like this:

path = 'aadada'

fopen(path)

I want to do create many files, the paths have a logic, so I can put them in cell array and than I want to pass them to fopen() , but fopen doesn't accept a string variable, this is strange.
 
Physics news on Phys.org
problem solved, just use char() to make characters of path