LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

a lot of time to multiply two arrays

Hello!
 
I want to multiply two arrays. The size of the two arrays is 1568x1568. I use to do it a AxB.vi block....but it spends a huge time, almost 17 seconds, when a operation like this have to be done it less than in a second.
 
I 've attached an example of the multiplication of two arrays with this size, you have to wait 16 seconds to obatin the result.
 
Someone know how i can do this multiplication as far as possible?I have to use another block.....for example....formula node and make iterations (or in this way you spend the same time?)
 
Thank you very much
 
Larson
0 Kudos
Message 1 of 24
(5,083 Views)

Hi larson

You should clearify how you want to multiply them. There are different ways to multiply two matrixes with each other.

Thomas

Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 2 of 24
(5,072 Views)
Hi!
 
I forget to attach the example.
 
I obtain two matrix in the code (in the example are constants but in my code are variables).
The result i want to obtain is the multiplication of this two matrix (90x1568 and 1568x1568). It works along 6-10seconds to obtain the result.
 
I want to know which is the BEST and the FASTEST way to multiplicate two arrays of this dimensions or of any dimensions. I don't want to use matlab script block, i want to calculate this operations inside of labview.
 
Thank you!
Larson
 
Using Labview 7.0 on WinXP
0 Kudos
Message 3 of 24
(5,062 Views)
Hi Larson,
 
I modified your VI,
 
just by using simple multiplier, i got a better result
 
if it still takes more time, check the virtual memory settings on your system.
 
regards
 
Dev
0 Kudos
Message 4 of 24
(5,049 Views)
On my pc (P4, 2.8GHz, 1GB Ram) it takes 5-6 seconds to run the vi. If you want to use LV, I think there is not a real option to the vi you used.
 
Do you really have to calculate the cross product in 1second? Could you maybe reduce data?
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
Message 5 of 24
(5,050 Views)
On my system (P4, 2.6GHz, 1GB Ram Win2K), the example runs in 19 seconds in LV7.0 but in 7.1 it runs in 300mS!
No idea why - perhaps the AxB function was rewritten for 7.1

Simon
Message 6 of 24
(5,048 Views)
One question: This is regarding Web Publication. I have created a Remote Front Panel for an executable file at the server using the Web Publizing Tool and I have included the executable in ' Startup' to run when the server computer starts up. When I do this and try to access this application from a remote computer, it gives a 'page not displayed'. Instead If I go to the folder where I have stored this executable and " www" folder with the publized page and opened from there and then try to access it remotely from a client computer..it works fine..... What may be the reason that the Remote access dont work when the executable runs at startup. One reason I could think of was that the "www" and the executable are not at the same directory when the executable is run at startup..so I placed the "www" folder also at the startup...But this dont help??  Have anyone faced this problem before or have any clue which this is happening?....
Please advice asap,

Thanks in advance.
0 Kudos
Message 7 of 24
(5,032 Views)
Hi
 
Although this question should not be posted in this thread, a possible solution: Did you start the webserver? If you run an executable, you have to start the webserver in the application. In the html-file you reference to the vi. So there must be the correct path of the vi.
 
 
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 8 of 24
(5,021 Views)


@Nomis wrote:
On my system (P4, 2.6GHz, 1GB Ram Win2K), the example runs in 19 seconds in LV7.0 but in 7.1 it runs in 300mS!
No idea why - perhaps the AxB function was rewritten for 7.1

Yes the matrix operations got a big makeover in LabVIEW 7.1 and are MUCH faster as demonstrated here.

On my 1.6GHz PentiumM laptop, the difference is not that big, but still about 10x.

  • LabVIEW 7.0: 3700ms
  • LabVIEW 7.1: 360ms

Time to upgrade! 😄

Message 9 of 24
(5,011 Views)

Ok!

I agree with altenbach, is time to upgrade!

But i want to ask you if it would be better to multiply this kind of arrays with formula node. I don't know if it's better and faster because C language doesn't work with matrix, for this reason to multiply two arrays you have to do one for strucutre inside another for strcuture, don't you?

Anyone can tell me if it's better and faster multiply arrays with AxB.vi block o formula node block (C language)??

 

Thank you very much for all your replies.

 

Larson

0 Kudos
Message 10 of 24
(4,988 Views)