LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using for loop to create an off diagonal elements

Solved!
Go to solution

The 1d array would be Nx1
I am trying to create a bus admittance matrix for power system flow.

Here are the links
https://circuitglobe.com/bus-admittance-matrix.html

Rusyaidi_arif_cute_1-1737566648359.png

for now i want to make diagonal part to be zero so that i can learn easier


another one is here
https://circuitglobe.com/formation-of-bus-admittance-matrix.html

Rusyaidi_arif_cute_0-1737566624837.png

I started using LabView last year so its hard for me to fully understand them.

0 Kudos
Message 11 of 22
(352 Views)

I am unsure of something like inplaceelement & shift register because my understanding of LabView functions are new.
how does shift register work in arrays? do they shift values from column to column or row to row?

0 Kudos
Message 12 of 22
(351 Views)

A shift register does not shift anything, it is just a memory location that you initialize coming into the loop, read and modify inside the loop and write it back to the same location on the right. When the loop ends, the final content is available at the output.

 

 

Message 13 of 22
(344 Views)

@Rusyaidi_arif_cute wrote:

The 1d array would be Nx1

Rusyaidi_arif_cute_1-1737566648359.png

for now i want to make diagonal part to be zero so that i can learn easier

 


The NxN Y matrix is based on the elements of another NxN matrix and there is much more symmetry than what you were telling us earlier.

 

Where does the 1D array fit into all of that?

 

So, setting the diagonal to zero wasn't even your problem? Why did you even bother asking us? It helps to fully formulate the problem instead of solving things that are not even needed in the end!

 

You. Need. To. Start. With. The. Basic. Tutorials!

0 Kudos
Message 14 of 22
(341 Views)
Solution
Accepted by topic author Rusyaidi_arif_cute

It is confusing to call both input arrays Y, but I assume that the elements with single indices are from the 1D array and vice versa.

 

Here's maybe something to ponder (and I did not even need a shift register!)

 

altenbach_0-1737573797675.png

 

 

Message 15 of 22
(326 Views)

Maybe its true because i just jump right through wihtout any basic LabView knowledge. 
Thank you for the advice!

0 Kudos
Message 16 of 22
(301 Views)

This is almost similiar on what I wanted to achieve.

Nevertheless, I could try to tweak a little bit or by using shift register (which im still learning) so that i could satisfy my output.
Thank you so much sir for your patience and for guiding me!

0 Kudos
Message 17 of 22
(298 Views)

i was trying out a bunch of things here but i finally got the results eventhough it is not in graphical language form.
May i know what are the downside of using Matlab script?

Rusyaidi_arif_cute_0-1737632894138.png

Rusyaidi_arif_cute_1-1737632901649.png

I have attached the file.

0 Kudos
Message 18 of 22
(285 Views)

Hi Rusyaidi,

 


@Rusyaidi_arif_cute wrote:

May i know what are the downside of using Matlab script?


  • You need Matlab installed.
  • You need a Matlab license.
  • You transfer data from LabVIEW to a 3rd party software: this will take its time...
  • You transfer data from Matlab to LabVIEW: this will also take time...
  • ...
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 19 of 22
(281 Views)

If it is a few lines of Matlab code, the LabVIEW equivalent will fit in a postage stamp am will be much more efficient.

 

I don't trust code that has measles (look at all the coercion dots!). An error terminal does not belong on top of a script mode!

 

I don't have Matlab installed.

At least resize the script so we can see all the text!

0 Kudos
Message 20 of 22
(268 Views)