help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Create & Calling list of Matrix name


From: quocphantruong
Subject: Create & Calling list of Matrix name
Date: Fri, 1 Mar 2019 16:39:19 -0600 (CST)

Hello
My problem is about naming and calling set of matrix name using loop
1. Let say I have a large matrix X(100x2). Now I want to cut this matrix
into 20 sub-matrixes and naming them from A1 to A20, each has size(5x2)

2. Then I need to perform some operation hence, need to call out matrix Ai
(for i=1:20) then how should I call them out in loop. 

I search and there is some solution:
  for i = 1:20 
    eval (sprintf ("A%d = %d;", i, i)); 
  endfor

Howevever, this seems does not work with matrix. And I dont get how the code
is doing, if you could help me explain that would be great
THank you
Phan




--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html



reply via email to

[Prev in Thread] Current Thread [Next in Thread]