From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, 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: 

Mathscript Error: sizes of the input matrices are incompatible

Solved!
Go to solution

Hello,

can someone help me clear this error??

 

0 Kudos
Message 1 of 6
(2,852 Views)

Hi Sarah,

 

why don't you use plain LabVIEW?

I tried to recreate your MathScript node using simple functions, so please check for errors on your own!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 6
(2,826 Views)

Thanks for your reply and for the simpler code. I have other equations that belong to the calculation, so it was much easier for me to have them all inside the mathscript. I had an error in Y and didn´t understand why the "matrices" sizes r incompatible (?)

0 Kudos
Message 3 of 6
(2,819 Views)

Hi Sarah,

 

according to my VI the result Y of your calculation should be a scalar, but you have defined it as array - that doesn't fit together!

 

Again: I'm not sure I converted your mathscript 100% correctly, so please cross-check for errors!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 6
(2,811 Views)

it must be a scalar that's true. Ychanges to an array when I set a range for n (here from 1 to 10000). For calculating Y, the n array elements should be simply summed together and then give a scalar Y as a result.

0 Kudos
Message 5 of 6
(2,808 Views)
Solution
Accepted by topic author s.steen

Now I found it. There was an error by the division. Forgot the dots behind the /. Now it works fine.

0 Kudos
Message 6 of 6
(2,789 Views)