09-29-2011 02:55 AM
Hi everyone,
I'd like to use math Script to calculate some intervals related to heart rate. The input is taking from simulated ECG for simplicity. The idea is displaying to the user the ECG and asks the user to denote the begining and end of the template interval with two cursors (0 and 1, respectively) and then set the outcome arrays as the inputs to Matlab script. However I always got the error 1050 as picture attached below "Error 1050 occurred at LabVIEW: Error occurred while executing script. Error message from server: ??? Error using ==> plus
Integers can only be combined with integers of the same class, or scalar doubles".
I have searched around this forum to find the solution for this error, have found some threads but not the same circumstances then I haven't figured it out yet.
Could some body find it out for me pls?
I attached the vi and pic of error following.
Tks a lot.
Shuri
09-29-2011 03:43 PM
Hi Shuri,
If possible could you try to isolate the problem a bit further? If we can find a line or two of code that is specifically causing this it will be easier to address.
Also I tried loading your program and was missing a coupled files needed like the QT Interval Modifier vi.
Also I have seen cases where restarting the computer has resolved similar issues. Is this a persistant problem?
09-29-2011 07:39 PM
Hi Scott,
Thanks for your reply. The error 1050 always happens even after I restarted the PC. Maybe the problem is in my code (you can see all my code in the matlab script) and I guess that there're also something wrong with the data types of outputs in matlab scripts.
And sorry that I forgot to attach the sub Vi inside my Vi from previous post. Now I got the ecg raw then I want to use the raw ecg for the input. Here all they are in the zip file (QTi_matlabscript.vi; QT interval modifier and ecg raw.txt) .
By the way, I suppose to use the active cursor to point out 2 positions in the ECG graph to use it as template for calculating in matlab algorithm. However it seems like useless in this way,I got no parameters calculated. Even if I came back to the simulated ecg as input like my first post Vi, no error 1050 anymore but the two cursors could not set fix template as the signal still running continuously.
Do you have any suggestions for these problems?
Rgs,
Shuri
10-02-2011 06:53 PM
could someone show me where is my error is?
10-03-2011 11:26 AM
When you run simple code in the MATLAB Script node it works well? Does the code work well or does another error come up? Does your .m code work within the MATLAB environment?
MATLAB® is a registered trademark of The MathWorks, Inc. Other product and company names listed are trademarks and trade names of their respective companies.