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 件のコメント

KSSV
KSSV 2019 年 5 月 21 日
編集済み: KSSV 2019 年 5 月 21 日
Attach your data as a matfile. Image snippet will not help us to help you.
Stephen23
Stephen23 2019 年 5 月 21 日
BdS:'s "Answer" moved here:
it is a local variable. How to save a local variable (which exists during the running of a function)? To run the function one needs connection to bloomberg.
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 日

1 投票

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 件)

質問済み:

BdS
2019 年 5 月 21 日

回答済み:

2019 年 5 月 21 日

Community Treasure Hunt

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

Start Hunting!

Translated by