LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error on giving 2D array input onto matscript

Solved!
Go to solution

Hello, Im fairly new on using LabView.

I have tried without using the 2D array input and it works fine.I would like to change the input of ' busdata'  through labview front panel.

Whenever I give 2D array input, it gives an error message.

Please help and thank you in advance. 

 

Without 2darray input.

Rusyaidi_arif_cute_1-1726412140120.png

Rusyaidi_arif_cute_2-1726412153075.png

With 2d array input.

Rusyaidi_arif_cute_3-1726412247009.png

Rusyaidi_arif_cute_4-1726412262030.png

 

 

0 Kudos
Message 1 of 8
(245 Views)

Nobody here will analyze pictures of code (overlapping objects, truncated script code, etc).

 

Your pictures show Matlab scripts (... which is quite different to Mathscript, which is no longer recommended or actively developed.)

 

What does the program do? It might be trivial to implement the same functionality in pure G.

0 Kudos
Message 2 of 8
(222 Views)

What i did was importing the matlab code  onto the matscript node. I just want the input to be user-defined using a 2D arrays which in this case is the ‘busdata, of the code. 
My codes ultimately gives a 2d array output after calculating the provided inputs using newton-raphson methods.

0 Kudos
Message 3 of 8
(198 Views)
Solution
Accepted by topic author Rusyaidi_arif_cute

There is no such thing as a "matscript node". You have a "Matlab script node".

 

Newton-raphson is easy to implement in plain G.

 

As said before, we cannot debug images.

Message 4 of 8
(184 Views)

Correct me if Im wrong, so my "matlab script node" can be implemented by using the "plain G". What do you mean by 'plain G' is it a toolkit or methods which can be applied in this case?
I have attached my sample work here.

0 Kudos
Message 5 of 8
(172 Views)

@Rusyaidi_arif_cute wrote:

Correct me if Im wrong, so my "matlab script node" can be implemented by using the "plain G". What do you mean by 'plain G' is it a toolkit or methods which can be applied in this case?
I have attached my sample work here.


G is the name of the LabVIEW native language, thus standard block diagram.

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 6 of 8
(158 Views)

@Rusyaidi_arif_cute wrote:

Correct me if Im wrong, so my "matlab script node" can be implemented by using the "plain G". What do you mean by 'plain G' is it a toolkit or methods which can be applied in this case?
I have attached my sample work here.


Two things:

 

  • When attaching code, make sure to do a "save for previous" (2020 or below) because most users here don't have the newest version (2024) installed and cannot look at your code.
  • In your code picture with the array input, we cannot even see where busdata is used in the code. Also, the front panel control should be sized so we can see an invalid row/column. Currently, we cannot tell how big that 2D array really is (in general array size is independent of container size)
  • I am a graphical programmer since the mid nineties (was a text programmer since the early seventies!) and I no longer do text based programming. Too tedious and annoying! While I have a MATLAB license, I did not even install it on my current computer, so I cannot really look at your code anyway. Hopefully someone else can help you.

If you could explain the code you are trying to implement, I might be able to help with graphical code. Can't be too hard. 😄

 

Message 7 of 8
(141 Views)

I will make sure to attach version 2020 or below on my next encounter. I believe I need to learn the Basic G programming and try my best to convert matlab script onto graphical codes from your advice. Will there be any other issues, I will come back to this forum.Thank you for your response and helpful insights.

0 Kudos
Message 8 of 8
(123 Views)