insert values of one table into another table if 1
조회 수: 1 (최근 30일)
이전 댓글 표시
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
채택된 답변
Walter Roberson
2022년 8월 1일
temp(table1{:,1}) = table2{:, 1};
Then array2table(temp) and provide the appropriate variable name
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!