insert values of one table into another table if 1
    3 Ansichten (letzte 30 Tage)
  
       Ältere Kommentare anzeigen
    
    Frederik Reese
 am 1 Aug. 2022
  
    
    
    
    
    Kommentiert: Frederik Reese
 am 2 Aug. 2022
            Hi, i have a question. Hopefully someone can help.
I have the attached tables with different size. One of them is a logical.
I want a new table:
if the logical table is 1 i want the first value of the second table
if the logical table is 0 i want 0 
f.e. 
Table 1 Table 2             new table 
1        547                            547
0         59                                0
0        439                                0
1        20                                59
Thanks for your help 
0 Kommentare
Akzeptierte Antwort
  Walter Roberson
      
      
 am 1 Aug. 2022
        temp(table1{:,1}) = table2{:, 1};
Then array2table(temp) and provide the appropriate variable name
1 Kommentar
Weitere Antworten (0)
Siehe auch
Kategorien
				Mehr zu Matrices and Arrays 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!

