Multiplying a column in a table by a constant
조회 수: 45 (최근 30일)
이전 댓글 표시
Hello,
I need to multiply a one-column table by e^-9. I don't know MATLAB code, so this is new to me. How can I do this please, any help would be appreciated.
Thank you,
Tim
댓글 수: 0
채택된 답변
Walter Roberson
2023년 8월 17일
편집: Walter Roberson
2023년 8월 18일
YourTableName.NameOfColumn = YourTableName.nameOfColumn * 1e-9;
The above is the recommended form.
If, for some reason, you do not know hte column name, but you know the column number, then
YourTableName.(ColumnNumber) = YourTableName.(ColumnNumber) * 1e-9;
댓글 수: 3
Zachary
2024년 9월 7일
I am trying to change units in my column. I want to go from mm to cm, so I just divide by 10. At the same time, I want to keep the original column value. How would you do that?
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Resizing and Reshaping Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!