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

Matlab class array / other array

  1. Nov 1, 2012 #1


    User Avatar

    Okay so what does this line of code mean:

    snleg = strtrim(cellstr(num2str(alf_deg.')));

    I did some research and it is ultimately removing whitespace (comma's, spaces etc) from a file scanned in, but I don't understand the argument of the function.

    I don't understand what cellstr is or num2str. I read that it might be to do with cell arrays and they can't or can be modified? I am very confused :sI imagine num2str converts a number to a string value but why do we need to do this?

    Please note, alf_deg was a variable already initialized in the code. Why do we need a .' in here?
  2. jcsd
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?
Draft saved Draft deleted