Is there a VBA add-in for matrix operations?

tuncalik

New Member
Joined
May 19, 2012
Messages
11
Hi all

Is there an extensive add-in for VBA/excel for matrix and vector operations?

In other words, an add-in with a selection of matlab or R functions?

Regards
Tunc
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
tuncalik,

Welcome to the MrExcel forum.

There is a lot of information out there if you do a web search for excel vba for matrix and vector operations add-in with a selection of matlab or R functions
 
Upvote 0
Hi Tunc
Welcome to the board

The matrix operations functions available in the worksheet can also be used in in vba. Do you need some special function? Maybe if you give some examples we can determine what is availble by default that serves your purposes and what's missing.
 
Upvote 0
Apart from matrix functions like matrix multiplication, matrix inverse and transpose that are available to VBA as worksheet functions, I mean other matrix and set functions like:


  • matrix create; like ones, zeros, rand in matlab
  • matrix append; append matrix A to matrix B, either vertically or horizontally, like [A; B] or [A B] in matlab
  • matrix partitioning; like A(rowindices, colindices) in matlab
  • unique; unique elements of matrices or vectors
  • set intersection, difference, union ...
  • matrix/vector aggregations with functions like max, min, average, median

and so on. There are more than 50 such matrix, vector or set operations that are needed to write useful high level functions based on these elementary matrix/vector/set functions.

Regards
Tunc
 
Upvote 0
Hi Tunc

You are right, an add-in for matrix operations will make your life easier.
I'm sorry i cannot help you with a reference.


I hope you'll get an answer here, but if you find the add-in outside of this board, we'd be thankful if you'd post it here for future reference.


Remarks:


If you know vba you could also implement these functions yourself.


Looking at the operations you mentioned, some observations:

  • matrix/vector aggregations with functions like max, min, average, median
  • matrix partitioning; like A(rowindices, colindices) in matlab

These ones, together with:

  • multiplication
  • inversion
  • transposition
  • determinant
are directly available in vba


  • matrix create; like ones, zeros, rand in matlab
  • matrix append; append matrix A to matrix B, either vertically or horizontally, like [A; B] or [A B] in matlab
  • unique; unique elements of vectors

These are directly implemented using an auxilliary worksheet.

They can also easily be implemented as vba functions.




  • unique; unique elements of matrices or vectors
  • set intersection, difference, union ...


For these ones you'd have to write functions, that seem, however, simple enough.

Hope this helps.
 
Last edited:
Upvote 0
Thank you for the information.

If I can't find such an add-in I will try to write it myself and let you know where to find it.

Regards
Tunc
 
Upvote 0

Forum statistics

Threads
1,223,676
Messages
6,173,758
Members
452,534
Latest member
autodiscreet

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top