필터 지우기
필터 지우기

Delete rows in cell arrays

조회 수: 2 (최근 30일)
BdS
BdS 2019년 5월 21일
답변: KSSV 2019년 5월 21일
Hi,
Have have got the following cell array:
cellarray.PNG
How can I delete the first row of the cell and add to each element in the first row 'Equity'. The end result should be for the first element: '1 HK Equity'
Thank you in advance for your help.
  댓글 수: 4
Stephen23
Stephen23 2019년 5월 21일
편집: Stephen23 2019년 5월 21일
"How to save a local variable (which exists during the running of a function)?"
Set a breakpoint in the function on a line that executes after that variable is defined. Once the code pauses, save the variable in a .mat file. Then continue/stop the code execution.
BdS
BdS 2019년 5월 21일
Thank you. My .mat file is enclosed

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

채택된 답변

KSSV
KSSV 2019년 5월 21일
load CellBdS.mat ;
s = rawPortData{1}.INDX_MWEIGHT_HIST ;
s = s{1} ;
c1 = s(:,1) ;
% delete first row
c1(1) = [] ;
% add Equity
c1 = strcat(c1,' Equity') ;

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Workspace Variables and MAT-Files에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by