From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Matlab script error 1050 in type of data

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

 

 

Download All
0 Kudos
Message 1 of 5
(2,564 Views)

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?

Scott A
SSP Product Manager
National Instruments
0 Kudos
Message 2 of 5
(2,551 Views)

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

0 Kudos
Message 3 of 5
(2,544 Views)

could someone show me where is my error is?

0 Kudos
Message 4 of 5
(2,528 Views)

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.

Scott A
SSP Product Manager
National Instruments
0 Kudos
Message 5 of 5
(2,509 Views)