07-11-2015 11:09 AM - edited 07-11-2015 11:24 AM
Hi , i'v built an vi which sampling saving and playing audio files , i've also added matlab script for data analysis.
the script tested in matlab and in matlab works great , when im trying to use it in labview i'm getting an error while the matlab sciprt executing . "Error using griddedInterpolant ....."
i think that the error occures whe trying execute the command : "Sigitp = interp1(clptv, clpsig, tv, 'linear'); "
moreover i cant figure how to read the saved filed when the loop is finished.
I cant figure out what is the problem .
here is the vi :
i've also included the vi
Solved! Go to Solution.
07-11-2015 01:45 PM
found out how to get this work out , the problem was with input to the matlab script .
07-11-2015 02:02 PM
@Cobmetal wrote:
found out how to get this work out , the problem was with input to the matlab script .
For anyone thinking of basing their code on this example: This is not a recommended solution to the problem. Execution order is artificially enforced by using a sequence structure when it should be done using dataflow basics. See this link for some very good tutorials. By understanding dataflow basics - the heart of LabVIEW - you should almost never need a sequence structure.
07-11-2015 02:14 PM - edited 07-11-2015 02:15 PM
Im novice to labview , and im learning a lot from NI community , thank you for your suggestion , i will go over it , and try to learn the proper way to implement such tasks in the future.
Thank You.
07-11-2015 02:16 PM - edited 07-11-2015 02:19 PM
@Cobmetal wrote:
Im novice to labview , and im learning a lot from NI community , thank you for your suggestion , i will go over it , and try to learn the proper way to implement such tasks in the future.
Thank You.
That's excellent! I believe that if you truly understand dataflow, you will see why your solution isn't the best one. ASK QUESTIONS IF YOU DON'T UNDERSTAND SOMETHING. I put that in bold caps because we are here to help you understand and get better. 🙂
Example:
"According to what I learned about dataflow, I think this part of my solution mentioned above can look like this. (Upload picture.) Does that seem right to you?"
07-11-2015 02:29 PM