gather() in tall array inverse is incorrect
Show older comments
Hi,
I am testing simple code with tall array inverse and gather(). The following results are different, anyone knows how to fix gather? As I am using tall array for AA and bb.
AA = ones(13,9);
bb = ones(13,1);
AA_t = tall(ones(13,9));
bb_t = tall(ones(13,1));
gather(AA_t\bb_t);
AA \ bb;
3 Comments
Defining AA and bb consist of only 1's is ... not going to work, as the warning tells us:
AA = ones(13,9);
bb = ones(13,1);
gather(tall(AA)\tall(bb))
AA \ bb
Using values that are not rank deficient produces much more sensible results:
AA = rand(13,9);
bb = rand(13,1);
gather(tall(AA)\tall(bb))
AA \ bb
Lets try with the uploaded data:
S = load('AAbb.mat')
S.AA \ S.bb
Note how the warning even tells us the rank of your matrix AA.
Apart from the values that you are using, it is unclear what the problem is.
chen zhe
on 27 Jun 2024
"why gather()cannot evaluate the same results as non-tall array case?"
For efficient handling of the different data types they use different algorithms. No surprises there.
"Is there a solution to make consistent results: A/b and gather(A_t/b_t)? They all have the rank deficient issue"
There are infinitely many solutions. Why should we expect any one solution to be preferred?
Answers (1)
Aditya
on 27 Jun 2024
Hi Chen,
please modify this line and see whether the issue persists or not!
gather(AA_t)\gather(bb_t);
Categories
Find more on Timetables in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!