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

Structure field *Matlab

  1. Jun 29, 2010 #1
    For some reason, when I try to use this function it has a problem passing along the fname input.
    For example, I'd type something like :

    Field(S, 'names')


    This returns an error:

    ??? Reference to non-existent field 'fname'.

    Error in ==> CheckFieldConsistency at 4
    [m n] = size(Q(1).fname);


    function output = Field(Q, fname)

    k = 0;
    [m n] = size(Q(1).fname);
    dim = [m n];

    Can someone please enlighten me on how I would go about passing this string along into the function to be utilized?

    Thank you for your time.
  2. jcsd
  3. Jun 29, 2010 #2
    Does no one really know?
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook