Symbolic solve throwing division by zero error
    9 visualizzazioni (ultimi 30 giorni)
  
       Mostra commenti meno recenti
    
The following code periodically throws a division by zero error.
m = 4;
n = 4;
X = sym('X', [m n]);
A = randi([0 1],n,n^2);
B = randi([0 1],m,m^2);
E = X*A - B*kron(X,X);
S = solve(E == 0,X);
S

Is it because there are too many variables?
Is it trying to numerically get solutions and is dividing by small numbers?
The error message is an image because the error rarely happens and I could not get it to happen while writing up this question.
8 Commenti
  Joseph Daynger Ruiz
 il 3 Mar 2023
				
      Modificato: Joseph Daynger Ruiz
 il 3 Mar 2023
  
			
		
  Joseph Daynger Ruiz
 il 3 Mar 2023
				
      Modificato: Joseph Daynger Ruiz
 il 3 Mar 2023
  
			
		Risposte (1)
  Muskan
    
 il 21 Apr 2023
        Hi Joseph, 
I tried running your code in R2022b and it does not seem to give any error for that. 
Thanks 
1 Commento
  Joseph Daynger Ruiz
 il 21 Apr 2023
				
      Modificato: Joseph Daynger Ruiz
 il 21 Apr 2023
  
			
		Vedere anche
Categorie
				Scopri di più su Polynomials in Help Center e File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!




