problem in giving variable name to table for export

조회 수: 4 (최근 30일)
SEPIDEH
SEPIDEH 2015년 10월 26일
편집: SEPIDEH 2015년 10월 26일
Hi all,
I have a cell array matrix which is: result1 =
'piezometer/depth[cm]' [ 5] [ 10] [ 30] [ 50] [ 100]
'F2(RT[Sec])' [7020] [13740] [37620] [55740] [ 77520]
'F3(RT[Sec])' [1440] [ 2820] [ 7800] [11460] [ 15420]
'F5(RT[Sec])' [6300] [12600] [37980] [63600] [128580]
How is possible to consider the first row and column as header and then export them as txt or dat file like a table?
After this step I want to have plot some thing like the picture that I attached here (I prepared this plot using excel).
Hope to hear your answers. Thanks

답변 (1개)

Walter Roberson
Walter Roberson 2015년 10월 26일
cell2table( result1(:,2:end).', 'VariableNames', result1(:,1) )
  댓글 수: 1
SEPIDEH
SEPIDEH 2015년 10월 26일
편집: SEPIDEH 2015년 10월 26일
Hi, thanks for reply.
But I got this error, how is it possible to solve this problem?
Error: Error using cell2table (line 69) 'piezometer/depth[cm]' is not a valid variable name.
Hope to hear from you. Best Sepideh

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

카테고리

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