How to search for header name and only pull that column as an array you can multiply
조회 수: 14 (최근 30일)
이전 댓글 표시
I have a table that includes my full csv (with headers) and I am hoping to search for a specific header name (cellSize) and pull that data into a structure I can multiply.
댓글 수: 0
채택된 답변
dpb
2020년 8월 3일
If you loaded the .csv into a table with headers that are variable names, you don't need to search nor "pull" data -- just reference it directly.
newvar=t.cellSize*pi; % multiply cellSize table "t" variable by pi; store in array
t.newvar=t.cellSize*pi; % multiply cellSize table "t" variable by pi; store in new var in table "t"
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Structures에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!