LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

blkdiag in Labview

Hi all, 

 

I'd like to know is there a special VI that would correspond to blkdiag in Matlab, to create a block diagonal matrix from other matrices or do I have to go the long way around and add one by one using Set Submatrix?

 

Thanks!

0 Kudos
Message 1 of 4
(2,836 Views)

Hi Mark,

 

I don't think you will find a LabVIEW function for this.

But it also looks like a simple autoindexing loop might be the most complicated you need to program this on your own…

Best regards,
GerdW


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

Hey Markanbl,

 

No there is no special VI but you can use the blkdiag command.

 

In LV the the command is " function y = blkdiag(varargin)"

add it in "Matlab Script" area.

 

In addition a short kB for Matlab -> LV communication

http://zone.ni.com/reference/en-XX/help/371361K-01/lvhowto/creating_a_matlab_script/

 

best regards

Timo Schröder

 

 

AE National Instruments

0 Kudos
Message 3 of 4
(2,787 Views)

I'd like to use MathScript but I can't, apparently MathScript is a lot slower than the rest of LabView so I have to do everything "manually".

 

Thank you

0 Kudos
Message 4 of 4
(2,777 Views)