Matrix Raised to a Power in Excel

To Whom it May Concern,
I am working with matrices in Excel 2010 and happened upon a problem.  Excel can perform matrix multiplication (e.g. A1:B2 times A3:B4) by the mmult function and yields the correct answer.  However, there is a problem when attempting to raise a
single matrix to a power - e.g. A^3 (for some array I refer to as A).
Various fora online all suggest using the power function on an array (thus, using the ctrl + shift + enter).  This takes each entry of the matrix and raises it to the given power.  This is NOT the same as raising the matrix to the given power,
and thus yields an incorrect result if the user is hoping to perform such an operation.  Effectively, I'm curious as to the existence of an excel function that uses the method of mmult for raising a matrix to a power.
I'm not sure if this is an error in an excel function or something that exists in an add on.  Please let me know if there is a way to properly raise a matrix to a power in excel.
Thanks,
Louis

Well, you can make your own simple matrix power function, like this;
Function PowerMatrix(rngInp As Range, lngPow As Long) As Variant
Dim i As Long
PowerMatrix = rngInp
If lngPow > 1 Then
For i = 2 To lngPow
PowerMatrix = Application.WorksheetFunction.MMult(rngInp, PowerMatrix)
Next
End If
End Function
Use it in a range like;
=PowerMatrix(A1:B2,3)
to get the matrix to the third power. Enter the function as an array formula.
This simple function does not test for a square matrix (which you need if you are going to multiply a matrix by itself).
Ed Ferrero
www.edferrero.com
I know this is an ancient post but there is a much better answer. If you want to raise the matrix to a large power (like 1 billion), the above will leave you waiting for a long time. Note that X^100 can be represented as (X^64)*(X^32)*(X^4) = (X^2^2) * (X^2^2^2^2^2)
* (X^2^2^2^2^2^2). By repeatedly squaring and multiplying the squares by the output value you can drastically reduce the number multiplications required.
Function PowerMatrix(Matrix As Range, Power As Long) As Variant
Dim Result As Variant
Dim Square As Variant
Dim i As Long
Square = Matrix
For i = 0 To 31
If (Power And 2 ^ i) Then
If IsEmpty(Result) Then
Result = Square
Else
Result = Application.WorksheetFunction.MMult(Square, Result)
End If
End If
If 2 ^ i >= Power Then Exit For
Square = Application.WorksheetFunction.MMult(Square, Square)
Next
PowerMatrix = Result
End Function

Similar Messages

  • I want to get an app where i can work power point, excel, and word?

    i heard about keynote, numbers, and letters. I tried to find it, but i couldnt. Thank you for your patience and effort,
    Laura Diaz

    Lacadiga
    I would suggest using Office for Mac and you need to buy it at a physical Apple store or downlaod from Microsoft.  It is a fully functioning and compatible with MS Office.  It's about 150$.
    I tried the various Apple products - like Numbers- and they are not as sophisticated as the Office products.  As well, if you are going to store Office products in the Apple icloud then they get converted to the various Apple i-products - ugh, it make s a mess.
    So I store all my Powerpoint, Excel and Word documents on Skydrive cloud where they are stored as native office products.
    Cheers

  • SSRS 2008 - Matrix subtotals in rows (like in Excel)

    Hello guys,
    I have to develop report in following structure:
    My best shot so far was creating matrix, but I don't know how to add the subtotal rows which are calculated as one row values divided by another.
    Source data snippet:
    Row Number
    Column 1
    Column 2
    21
    1
    2
    22
    3
    2
    23
    6
    6
    24
    9
    6
    Desired output in report:
    Row Number
    Column 1
    Column 2
    21
    1
    2
    22
    3
    2
    23
    6
    6
    Row no. 23/Row no. 22
    2
    3
    24
    9
    6
    Row no. 24/Row no. 22
    3
    3
    I was able to create matrix with Row Number but cannot figure out how to add rows with subtotals as showed above.
    Any suggestion would be greatly apprecited.
    Roy

    Hi Roy,
    According to your description, you want to create some calculated rows, which stores the previous row value divided by a specified row value.
    In Reporting Service, we can use matrix to group data by multiple fields or expressions in row and column groups. But it’s impossible to add a data row directly between two row groups. In this scenario, it’s also impossible to get the value of a specific
    data row. So we can never make a data row divided by another data row. By the way, even you could add a row, when you use rownumber() function, the row number will increase with the added row. So your requirement can’t be achieved currently.
    Reference:
    Matrices (Report Builder and SSRS)
    If you have any question, please feel free to ask.
    Best regards,
    Qiuyun Yu

  • Can I move files fron Adobe Reader to another location like, Power Point, Excel, Pubisher, etc

    Hi! can't move any picture fron Adobe to another location like Word, Excel,Paint. etc......, there is any way to do it? Thanks a lot!!!

    Wrong forum. None of these applications run on PalmOS. I think you want:
    Also confirm that you m ean Adobe Acrobat Reader, not some other Adobe product, like Flash, and indicate the version and OS version. Are you ssre the images are not copy protected?

  • Power Pivot enable Excel workbook protection with password?

    Hi All
    We have a power pivot deployment without SharePoint in excel 2013 professional plus. All woks fine until we use a password to protect excel workbook so unauthorised users cannot open it. After enabling password protection we cannot access the power pivot
    data model under power pivot excel tab. It tries to upgrade the power pivot model(which is not logical because it didn't do it before and was working fine). thereafter upgrade fails.
    Has anyone successfully password protected a power pivot excel 2013 workbook? Is there a workaround to enabling security without SharePoint/office 365 etc?
    Thanks
    Sonny

    Hi Sonny,
    PowerPivot does not support row security or dynamic security. Security for a workbook is just a binary choice – either a user can read a workbook or she can’t.
    In this case, I would suggest you consider designing Tabular model which can be secured using row security and dynamic security is also supported. For more information, please see:
    Comparing Tabular and Multidimensional Solutions (SSAS):
    http://technet.microsoft.com/en-us/library/hh212940.aspx
    Regards,
    Elvis Long
    TechNet Community Support

  • Power Pivot Configuration error while refreshing connection on excel sheet for SharePoint 2013 and Sql server 2014 using BISM file connection

    I am getting following error while refreshing connection on excel sheet in power pivot gallery,
    my scenario,
    using BISM file connection to create and  refresh power pivot excel sheet in power pivot gallery
    throws error and we have sql server 2014 CU6 updated installed plus sharepoint 2013. i checked following msolap110.dll is available in our environment but assembly
    Microsoft.AnalysisServices.ChannelTransport is not available. 
    i found error in event viewer,
    "Activation context generation failed for "C:\Program Files\Microsoft Analysis
    Services\AS OLEDB\110\msolap110.dll". Dependent Assembly
    Microsoft.AnalysisServices.ChannelTransport,processorArchitecture="MSIL",publicKeyToken="89845dcd8080cc91",version="11.0.0.0" could
    not be found. Please use sxstrace.exe for detailed diagnosis.
    what should i do to fix it?
    Thanks for help.
    Deepak Patel

    Rebecca,
    yes, this is issue i am getting.
    Activation
    context generation failed for "C:\Program
    Files\Microsoft Analysis Services\AS OLEDB\110\msolap110.dll".
    Dependent AssemblyMicrosoft.AnalysisServices.ChannelTransport,processorArchitecture="MSIL",publicKeyToken="89845dcd8080cc91",version="11.0.0.0" could
    not be found. Please use sxstrace.exe for detailed diagnosis.
    let me know if you can find fix for it.
    THanks,

  • Oracle Matrix Rpt output to Microsoft Excel File

    I am looking for a solution that would take my current Oracle 9i matrix report output directly to an excel file. I have clients that need to see the report not in a pdf format(which I currently use) but in an excel format.
    Thanks,

    You could either use:
    a) DELIMITED output, assuming that the matrix isn't too large.
    b) DELIMITEDDATA output, which will just give you a dump of the data, and you'd need to construct the cross tab directly.
    c) In you're using 9i, then you could use jsp tags to output directly into an Excel html file (this could get pretty complicated for a matrix report). See an example of this at http://otn.oracle.com/products/reports/htdocs/getstart/demonstrations/index.html
    Regards,
    Danny

  • Matrix report data with summary column in excel format

    Hi ,
    I want to display output of matrix report with summary column in excel format.
    I have tried using spreadsheet but column header and actual data is displaying in proper order.
    Please tell me the way how to do this ASAP.
    Thanks in advance.

    Hi ,
    I want to display output of matrix report with summary column in excel format.
    I have tried using spreadsheet but column header and actual data is displaying in proper order.
    Please tell me the way how to do this ASAP.
    Thanks in advance.

  • Can I copy Power Query queries to other Excel workbook ?

    Can I copy Power Query queries to other Excel workbook ?
    I want to copy some Power Query queies to other Excel workbook.
    a workbook have some queries about population.
    a workbook have some queries about labor market.
    I want to build a workbook with population queries and labor market queries for sharing OneDrive.
    Regards,
    Yoshihiro Kawabata

    Thank you, Curt.
    Yes, Now I copy by M code.
    I want  more easy way.
    When sharing Query at Power BI, Excel automatically share all related queries by one click.
    Regards,
    Yoshihiro Kawabata 

  • Just upgraded to ML and now 2011 word, excel,OL and Power point wont work

    I did the mountain lion upgrade this morning and have just tried to open MS word 2011 to do some quotes and everytime I try and open word, power point, Excel it says
    Microsoft word has encountered a problem and needs to close. We are sorry for the inconvenience
    error sending is an option which I have done lots
    The MS products are all legit purchased products and are for mac
    Have tried software update but non are available...
    Any one else had this / know a solution
    Thanks
    Rob

    Ok
    Just tried totaly removing office from the mac using app cleaner
    Re installed office (this is via a legit download site where I paid for the software)
    Once installation was complete I tried to open word, power point, excel and OL and non of them will open keep getting the error message and an option to send a report
    The updates from microsoft still wont work I just get the same message
    Office 2011 14.1.0 update cant be installed on this disk. A version of the software required to install this update was not found on this volume.
    LANNY everything is where its supposed to be as it was a re installation of office
    ANY IDEAS.......
    Rob

  • I am running OS X10.4.11 Recently I have been having trouble opening entourage, word, safari, excel, etc on a cold start  It has been taking 3 attempts  each time getting a message that the program quit unexpectedly.  Seems like a virus.  What can I do?

    1st attempt to open an application after the computer has been shut down a message says(as an example)" the application PowerPoint quit unexpectedly.  Mac OS X and other applications are not affected.  Click reopen to see more details or send a report to Apple."  Next attempt it says "The application PowerPoint quit unexpectedly after it was reopened.  Mac Os X and other applications are not affected.  Click Try Again to temporarily restore the application's default settings and open it again.  Click Report to see more details or send a report to Apple."  When I click "Try Again"  the app opens normally and usually runs ok  sometimes it will quit unexpectedly but when reopening at that point it opens ok.  Never had this issue until about 2 weeks ago.  ***  When I close the program myself I get a message that says "PowerPoint-New Settings
    New settings have been created for this application.  Do you want to use these settings from now on?  Then there  are  2 buttons below the dialogue box that say "Use new settings and Use original settings"  This happens every time I try to open Power Point, Excel, Safari, Entourage the first time each new day.  If I have been running any of those programs and have not shut down the laptop then the program will reopen normally but may shut down unexpectedly on its own  and sometimes not. What changed and how do I fix this problem?  Running OS X10.4.11 and software updates are current.  Ran diagnostics and checked out ok.

    Very Important, how much Free Space is on your Hard Drive first of all? Click on the Macintosh HD on the Desktop, then do a Get Info on it.
    Could be many things, we should start with this...
    "Try Disk Utility
    1. Insert the Mac OS X Install disc, then restart the computer while holding the C key.
    2. When your computer finishes starting up from the disc, choose Disk Utility from the Installer menu at top of the screen. (In Mac OS X 10.4 or later, you must select your language first.)
    *Important: Do not click Continue in the first screen of the Installer. If you do, you must restart from the disc again to access Disk Utility.*
    3. Click the First Aid tab.
    4. Select your Mac OS X volume.
    5. Click Repair Disk, (not Repair Permissions). Disk Utility checks and repairs the disk."
    http://docs.info.apple.com/article.html?artnum=106214
    Then try a Safe Boot, (holding Shift key down at bootup), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, reboot when it completes.
    (Safe boot may stay on the gray radian for a long time, let it go, it's trying to repair the Hard Drive.)
    If perchance you can't find your install Disc, at least try it from the Safe Boot part onward.
    Do they launch OK while in Safe Mode?

  • Can't save BISM file pointing to excel sheet (data source). ErrMsg: "There were errors found while validating the page: Cannot connect to the server or database."

    Hi,
    Me and a collegue is administrering our new enterprise BI portal in SharePoint 2013 (On Premise) and have a problem with using a specific Excel file including general ledger data as data source through a BISM file.
    This particular BISM file can't be saved without getting the error message "There were errors found while validating the page: Cannot connect to the server or database."
    BISM files against other Excel sheets and sources (for example SSAS tabular databases) works well.
    Can anyone help us pinpointing whats wrong here, this is a really important stakeholder in our organization requesting this reporting?
    Cheers!

    Hi E.SWARD ,
    My self created a Power pivot excel then i want to use this excel to create BI file . Still i am getting the same error . Pls help me to resolve this issue
    Cannot connect to the server or database.
    I am getting the similar error , if i use Tabular analysis server instance .
    Subhash

  • How can I use PowerPivot tables like Excel tables -- printing, etc.?

    I can't seem to find any information on this anywhere, and even more surprisingly, no one else seems to have even asked this question...
    How can I use tables I create in the Excel PowerPivot window in the same ways I use tables that are in ordinary Excel worksheets, to accomplish tasks such as printing? I am able to use the powerful capabilities of PowerPivot to produce tables with precisely
    the information I need for reports -- connecting data from multiple tables/sources, filtering, etc. -- but then there doesn't seem to be any way to actually print what I'm seeing, nor can I seem to access cells in these PowerPivot tables from Excel worksheets.
    If a PowerPivot table is conceptually an Excel table with additional power in terms of pulling in data and relating it, it would seem appropriate that all the power of Excel could be brought to bear on these PowerPivot tables, but on the contrary, the available
    operations are limited. if, instead, a PowerPivot table is more correctly viewed as a data source that Excel worksheets can connect to, that would be fine, and indeed, one
    can use a PowerPivot table as a data source -- except it can't be brought into an Excel worksheet as an ordinary Excel table, unlike most other data sources.
    I hope I'm missing something really obvious, and that someone can point out what it is. Thanks.

    Kirchh,
    When PowerPivot was first designed, the decision was to integrate closely to Sharepoint to allow for team sharing. We are constantly evaluating customer feedback to add more features, and this has been one of the feedbacks we have received. We will consider
    supporting this in the future but with no gurantee.
    Chu
    -- This posting is provided "AS IS" with no warranties, and confers no rights
    I'm not questioning why PowerPivot is closely integrated with SharePoint. I'm asking why connecting to the PowerPivot model from within Excel was intentionally blocked by Microsoft, when all the functionality to do so appears to be present.
    Is creating an OLE DB connection in Excel to PowerPivot as $Embedded$ supported?
    No support. It was originally designed for SharePoint. This changed with Power Pivot for Excel 2013 (it's packaged with it). Originally the scope (in 2010 through 2012) was that it was for SharePoint users. So it became more obvious through that to market it
    toward all Excel users. Thus the recent changes. 
    Ed Price, Power BI & SQL Server Customer Program Manager (Blog,
    Small Basic,
    Wiki Ninjas,
    Wiki)
    Answer an interesting question?
    Create a wiki article about it!

  • In SharePoinr 2013. Unsupported Reporting Services Functionality The feature: "Power View" is not supported in this edition of Reporting Services.

    Hi,
    I am getting the below error which click "Create Power View Report" option in "Power Pivot Gallery"
    Unsupported Reporting Services Functionality
    The feature: "Power View" is not supported in this edition of Reporting Services.
    I have uploaded "Power Pivot" excel file in "Power Pivot Gallery".
    It is frustrating like anything. Can anyone help on it.
    SharePoint 2013. SQL Server 2012. I have enable all the service applications success in CA.
    Thanks in Advance.
    Poomani Sankaran

    Hi,
    Please try to download the SP1 Edition of the rsSharePoint.msi
    file and install it. You have to install the SP1 edition of RS if you are using SP 2013.
    Here is a similar thread for your reference:
    http://social.technet.microsoft.com/Forums/en-US/2d2ecfae-b524-43f3-bf93-0bddfe904b75/the-feature-power-view-is-not-supported-in-this-edition-of-reporting-services?forum=sharepointadmin
    Best Regards
    Dennis Guo
    TechNet Community Support

  • What is the maximum file size for CSV that Excel can open ? (Excel 2013 64bit)

    Hello,
    Before anyone jumps in, I am not talking about the maximum worksheet size of 1048576 rows by 16384 columns.
    I have  client whom has a 1.5 Gb CSV file, 1.9, 2.6, 5, 17 and 89 Gb file (Huge).
    If I open the 1.5 Gb, the file opens (After waiting 5 minutes) and then a warning pops up that only the first 1048576 rows have loaded. That is fair enough.
    If I try and open any of the others, Excel comes up to a blank worksheet. No errors. It just seems to ignore the file I tried to open. This happens from within Excel (File - open) or from double clicking the file in explorer.
    Excel goes to this blank page almost imeadiatly. It does not even try to open the file.
    If I try with Ms Access, I get a size warning and it refuses to load the file. (At least I get a warning)
    I would have expected Excel to load at least the first 1048576 rows  (If that is what there are in the file), and give an error.
    The computer is more than capable (Xeon processors, 16 Gb ram, SSD hard disks top of the line HP Z820 power workstation).
    With the 1.5 Gb file loaded to 1048576 rows, it uses 15% ram/pagefile. CPU's hit about 5%.
    I have confirmed it is Win 7 64bit, Excel 64bit. I am fairly confident we are over the file size but without an error message, I don't know what to tell my client whom is looking to me for answers.
    I have already discussed that the 89gb file in Excel is unreasonable and they are looking at a stat's package but I need an answer on these smaller files.
    Anyone got any ides ?
    Michael Jenkin (Mickyj) www.mickyj.com (Community website) - SBS MVP (2004 - 2008) *5 times Microsoft MVP award winner *Previously MacWorld Australia contributer *Previously APAC Vice Chairman Culminis (Pro IT User group support system)* APAC chairman GITCA
    *Director Business Technology Partners, Microsoft Small Business Specialist, SMB150 2012 Member

    Hi,
    The 1,048,576 rows & 16,384 columns is the
    workbook size limitation in Excel 2013. Thus, I recommend we try the Mr. Bernie's suggestions to import the large CSV file.
    1. Use VBA to read the file line by line and split/examine the import file in sections. If you have further question about the VBA, please post your question to the MSDN forum for Excel
    http://social.msdn.microsoft.com/Forums/en-US/home?forum=exceldev&filter=alltypes&sort=lastpostdesc
    2. Use Excel 2013 add-ins. Power Pivot and Power Query. For more detailed information, please see the below articles: 
    http://social.technet.microsoft.com/Forums/en-US/9243a533-4575-4fd6-b93a-4b95d21d9b10/table-with-more-than-1-048-576-rows-in-power-query-excel-2013?fo
    http://www.microsofttrends.com/2014/02/09/how-much-data-can-powerpivot-really-manage-how-about-122-million-records/
    Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.
    Thanks
    George Zhao
    Forum Support
    Come back and mark the replies as answers if they help and unmark them if they provide no help.
    If you have any feedback on our support, please click "[email protected]"

Maybe you are looking for