Selecting multiple data ranges
    4 Ansichten (letzte 30 Tage)
  
       Ältere Kommentare anzeigen
    
Hi,
This may be a simple thing, but I canot figure it out. This is simply something what I want to do ;
A1=(1:100)';
A2=(101:200)';
A3=[A1(1):A2(1),A1(2):A2(2),A1(3):A2(3),A1(4):A2(4), .............., A1(12):A2(12)]';
Is there any easy way to get this done rather than writing the long line with all 1 to 12 elements?
Appreciate your help
Thank you
0 Kommentare
Antworten (1)
  Matt Gaidica
      
 am 15 Dez. 2020
        
      Bearbeitet: Matt Gaidica
      
 am 15 Dez. 2020
  
      Do you need A1 and A2?
A3 = repmat(1:100,12,1) + transpose(repmat(0:11,100,1));
or 
A3 = bsxfun(@plus,0:11,transpose(1:100));
Siehe auch
Kategorien
				Mehr zu Logical finden Sie in Help Center und File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

