Question: Create a Python function named random square matrix power that can randomly generate a n - by - n squared matrix A and calculate its
Create a Python function named random square matrix power that can randomly generate a nbyn
squared matrix A and calculate its pth power Ap
The specific requirements are as follows.
Two inputs: i n the size of the squared matrix; ii p the power of matrix to be calculated
Two outputs: ii A the randomly generated matrix; ii Ap
the pth power of A
Test instance: test your algorithm with inputs n and p print the outputs.
Packages and functions you may need to use click will lead you to the webpages:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
