From cell array to matrix

조회 수: 3 (최근 30일)
Felipe Rios
Felipe Rios 2019년 12월 11일
댓글: Adam Danz 2019년 12월 11일
Hello Everyone: I need to convert the variables (10 temperature profiles collected with a CTD) contained inside a cell array (rsk.mat herein attached) to ten single arrays. Please could anyone provide a hint as to how to accomplish this?
Cheers,
Felipe
  댓글 수: 3
Adam Danz
Adam Danz 2019년 12월 11일
Felipe Rios's answer moved here as a comment.
Hi Adam: rsk.data contains the values for the 10 profiles I need to convert to single matrix for each profile.
Thanks,
Felipe
Adam Danz
Adam Danz 2019년 12월 11일
Glad I could help!

댓글을 달려면 로그인하십시오.

채택된 답변

Adam Danz
Adam Danz 2019년 12월 11일
편집: Adam Danz 2019년 12월 11일
This produces a 100x10 matrix and can be applied to several fields of rsk.data.
tstamp = [rsk.data.tstamp];
For fields that contain non-numeric data,
direction = {rsk.data.direction};
  댓글 수: 1
Adam Danz
Adam Danz 2019년 12월 11일
Felipe Rios's answer moved here as a comment
Thanks a lot Adam; profiles = [rsk.data.values] is what I needed!
I appreciate your help.
Cheers,
Felipe

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by