overwrite matrix A with matrix B (which has another size)
    11 vues (au cours des 30 derniers jours)
  
       Afficher commentaires plus anciens
    
    Nicole
 le 4 Juin 2014
  
    
    
    
    
    Réponse apportée : Henric Rydén
      
 le 4 Juin 2014
            Hi,
I would like to overwrite matrix_a with an extended matrix_b.
matrix_a has the dimension 19x57 and is full of data.
    matrix_b = [zeros(1,57) matrix_a] 
    matrix_a = matrix_b;
matrix_a has to be updated and I use this matrix in a loop.
The Error: "Size mismatch (size [57 x 19] ~= size [57 x 20])."
Is there any way to overwrite matrix_a with another matrix with different size?
Thanks! Greeting
0 commentaires
Réponse acceptée
  Henric Rydén
      
 le 4 Juin 2014
        matrix_b = [zeros(1,57) matrix_a];
clear matrix_a
matrix_a = matrix_b;
0 commentaires
Plus de réponses (0)
Voir également
Catégories
				En savoir plus sur Creating and Concatenating Matrices dans Help Center et File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!