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: 

matrix variable

how can i use variables inside the matrix , to control them from the front panel, plz help me im new in LabVIEW

 

 

 

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

Your matrix is already a control and you can fully operate it at run time.

0 Kudos
Message 2 of 8
(2,848 Views)

but i need to make some elements as separated variables and others as constants for example:

 

    1  0  tx

    0  1  ty

    0  0  1

0 Kudos
Message 3 of 8
(2,841 Views)

but i need to make some elements as separated variables and others as constants for example:

 

    1  0  tx

    0  1  ty

    0  0  1

0 Kudos
Message 4 of 8
(2,841 Views)

You are talking about controls, not "variables". Just create an array control with two elements and replace the desired matrix elements with its value. Is this to be operated from the front panel ot to be used in plain code?

 

Can you explain in more details what you are trying to do? 

0 Kudos
Message 5 of 8
(2,822 Views)

if i need to use another variables with cosine and sine (replaced to Tx and Ty ) , the angle must be controlled and the cos or sin is calculated after that this value insertes the matrix

 

1  0  cos th

0  1  sin th

0  0     1

0 Kudos
Message 6 of 8
(2,807 Views)

Do you want the contents of this matrix to be editable on the front panel, or do you just need it to be available in memory? If you just need it available in memory you can define your matrix using a matrix constant then simply use the set matrix elements function to manipulate the values.

 

Something similar could be done with a control and property nodes. If you just want to display it, an indicator should be sufficient.

--------------------------------------
0 Kudos
Message 7 of 8
(2,768 Views)

Maybe some basic terminology would be in order.

 

In LabVIEW, "constants" are just initial values that don't have a corresponding front panel element: they are fully editable programatically.

 

You also need to forget the concept of symbolic variables. Just treat every element as a distinct value. If you need to manipulate the data within it based on other data, just calculate the value you want that element to be and place that value in there using an appropriate function.

 

It's a very different conceptual process than that used in most text-based mathematical environments and can take some getting used to. Maybe if you could give us a better idea of what your big picture is, or even post some pseudo-code we could be of a little more help.

--------------------------------------
0 Kudos
Message 8 of 8
(2,765 Views)