RoopB
Aerospace
- May 24, 2010
- 6
Hello all,
I'm in the process of translating some old C++ code into Matlab in order to make my matrix and vector operations easier. I am still fairly novice with Matlab, so I've come upon a problem that I am not sure can be done the way I imagine it should work. My goal is to interpolate through a x-y matrix that is contained in a seperate .m file from my code.
I am trying to lay out my logic in this way for my program:
- Here is some input (including x, y, and the array name).
- Call File2 that contains the actual routine to interpolate in an array.
- Call File3 that holds my arrays.
- Find the array that I have specified.
- Interpolate from this array, given my inputs.
- Return the value to me.
My sticking point is trying to load the file that contians all of my arrays (I have many), where one array can be picked out and used.
Has anyone else done something similar to this before? I am not entirely sure how to work around this problem. I have sucessfully made a test interpolation from a small table, using interp1 with a .mat file, but I had to strip all of the headings and comments out of my array. I didn't want to do this with my actual data.
Thanks in advance for your thoughts!
I'm in the process of translating some old C++ code into Matlab in order to make my matrix and vector operations easier. I am still fairly novice with Matlab, so I've come upon a problem that I am not sure can be done the way I imagine it should work. My goal is to interpolate through a x-y matrix that is contained in a seperate .m file from my code.
I am trying to lay out my logic in this way for my program:
- Here is some input (including x, y, and the array name).
- Call File2 that contains the actual routine to interpolate in an array.
- Call File3 that holds my arrays.
- Find the array that I have specified.
- Interpolate from this array, given my inputs.
- Return the value to me.
My sticking point is trying to load the file that contians all of my arrays (I have many), where one array can be picked out and used.
Has anyone else done something similar to this before? I am not entirely sure how to work around this problem. I have sucessfully made a test interpolation from a small table, using interp1 with a .mat file, but I had to strip all of the headings and comments out of my array. I didn't want to do this with my actual data.
Thanks in advance for your thoughts!