subtract value from column in table

조회 수: 24 (최근 30일)
Dion Theunissen
Dion Theunissen 2021년 6월 10일
답변: Scott MacKenzie 2021년 6월 10일
hi,
I want to subtract a table column from a value.
like this:
for c = 1:8
minus = table2array(Scan(1,c));
Scan(:,c) = (Scan(:,c)-minus);
end
but i get the error that operator '-' is not supported in tables.
How can I fix this?

채택된 답변

Scott MacKenzie
Scott MacKenzie 2021년 6월 10일
You need to use braces:
Scan{:,c} = (Scan{:,c}-minus);

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by