ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

error 1050 with matlab script

Solved!
Go to solution

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 : 

Capture.PNG

i've also included the vi 

0 Kudos
Message 1 of 6
(5,424 Views)
Solution
Accepted by topic author Cobmetal

found out how to get this work out , the problem was with input to the matlab script .

Capture.PNG

0 Kudos
Message 2 of 6
(5,363 Views)

@Cobmetal wrote:

found out how to get this work out , the problem was with input to the matlab script .

Capture.PNG


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.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 3 of 6
(5,351 Views)

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.

0 Kudos
Message 4 of 6
(5,344 Views)

@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?"

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 5 of 6
(5,339 Views)

Smiley Wink

0 Kudos
Message 6 of 6
(5,333 Views)