Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Matlab: String variables to fopen()

  1. Sep 3, 2011 #1
    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.
     
  2. jcsd
  3. Sep 3, 2011 #2
    problem solved, just use char() to make characters of path
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook