385 reputation
110
bio website
location
age
visits member for 2 years, 6 months
seen Oct 17 at 15:10

Apr
26
comment How to use Compile for accelerating matrix multiplications?
Please write a code solution based on your tip. I am not familiar with your suggestion.
Apr
26
comment How to use Compile for accelerating matrix multiplications?
So, if you think there is any other way to speed up the process, I am happy to be informed. Furthermore, I cannot use CUDADot in my MMA. It fails to be fully downloaded and installed after 30 minutes. Any tips to accelerate the process is fully appreciated.
Apr
25
comment How to find the index of a square matrix in Mathematica quickly?
Dear J.M., I must compute the index for both types of matrices. Specially for inexact matrices. It would also be nice if an algorithm could produce $k$, $A^k$ and $A^{k+1}$ at the end of its run for all types of matrices.
Apr
25
comment How to find the index of a square matrix in Mathematica quickly?
Thanks. I meant if for example the rank is 2, then I need $A^2$ and $A^3$, i.e. the last two matrices in process of computations not the first two matrices.
Apr
25
comment How to find the index of a square matrix in Mathematica quickly?
Excellent idea. Can you check that why your technique cannot produce the result for a simple matrix in floating points arithmetic as follows: $n=100; a = RandomReal[{}, {n, n}]$. I faced with some errors such as "Transpose::nmtx: "The first two levels of the one-dimensional list {} cannot be transposed."".
Apr
25
comment How to find the index of a square matrix in Mathematica quickly?
Mr. Wizard, can you revise your code in order to give $A^k$ and $A^{k+1}$ as well. I mean I also need the last two matrices $A^{k+1}$ and $A^{k}$! Although $k$ is obvious but I do not want to compute them again because it might be time-consuming for large matrices! Can you give me a hand in this?
Apr
25
comment How to find the index of a square matrix in Mathematica quickly?
Thanks Mr. Wizard. It works good. Any improvement on the code will be appreciated.
Apr
24
comment How to find the index of a square matrix in Mathematica quickly?
I think the code is not working well, Mr. Wizard is right down here. For a random matrix, it sould give 0 while produces 5 as the $Ind(A)$.
Apr
24
comment How to find the index of a square matrix in Mathematica quickly?
You are totally right Mr. Wizard, the codes sounds to be incorrect. For the 500*500 example of you, the answer must be $Ind(A)=0$. Because $A^0$ and $A^1$ agrees in terms of rank. So is there any bug here?
Apr
24
comment How to find the index of a square matrix in Mathematica quickly?
Yes, your answer always gives 2 as the output by varying $n$, while the output of Szabolcs's code is correct and is what I want. Your technique to accelerate the process is nice, but currently not working.
Apr
24
comment How to find the index of a square matrix in Mathematica quickly?
I think Mr. Wizard answer needs some revision. I mean the answers are not the same. For instance, check the following sample examples: Clear["Global`*"] SeedRandom[1234]; n = 500; A = RandomReal[{}, {n, n}]; Length@NestWhileList[A.# &, A, MatrixRank[#] == MatrixRank[#2] &, 2] // AbsoluteTiming Length@NestWhileList[{A.#[[1]], MatrixRank@#[[1]]} &, {A, -1}, #[[2]] == #2[[2]] &, 2] // AbsoluteTiming
Apr
24
asked How to find the index of a square matrix in Mathematica quickly?
Apr
6
comment How to draw Fractal images of iteration functions on the Riemann sphere?
Thanks. An excellent answer. Just one note. There might be some diverging points (black areas) in the fractal picture for some test problems. On the other hand, we used a color correspond to a point in a sphere or a rectangular domain. So, the domain of working (I mean the mesh of points) are finite. So is it possible to count the number of diverging points? I mean it would be nice to have the percentage of diverging points for each fractal picture. Is it possible to cunt the number of diverging points in your implementation?
Apr
5
awarded  Nice Question
Mar
11
comment How to use Compile for accelerating matrix multiplications?
So, is there any other way such as parallelization?
Mar
11
comment How to use Compile for accelerating matrix multiplications?
As far as I know, for smin and smax, Mathematica 8 uses the Arnoldi algorithm with at most 1000 MaxIterations. However, this part is quite fast. Do you think, is there any way to use Compile for speeding this code up?
Mar
11
asked How to use Compile for accelerating matrix multiplications?
Feb
26
comment How could we define a function recursively?
Thank you ssch. The second way that you describe is my question. That is, the old beta is in the right side and the new beta must be obtained as the left beta. Therefore, in your second part of the answer, there are still some drawbacks in my idea. Since, I need the final formula as an iteration function (similar to the case of Sign[z]), not to be defined numerically as you have done for four nested values. Is there any way to define this recursive function by two parts I mean the first part calculate a new value (a new value) and the second part update beta?
Feb
26
asked How could we define a function recursively?
Feb
24
awarded  Commentator