How to delete numbers from cell?
1 回表示 (過去 30 日間)
古いコメントを表示
I have a cell array that contains the following lines:
'0,31:1.03 SPEED MEASURED 1 [rpm]'
'0,31:1.04 MOTOR SPEED [rpm]'
'0,31:1.08 MOTOR TORQUE [%]'
'0,31:25.04 TORQUE REF B [%]'
I want to use them as titles for figures, but without the numbers preceding the text. For a figure that plots the measured speed, for example, I would want to have a title like this: SPEED MEASURED 1 [rpm]. How can I go about doing this?
0 件のコメント
採用された回答
その他の回答 (1 件)
Andrei Bobrov
2019 年 6 月 13 日
a = {'0,31:1.03 SPEED MEASURED 1 [rpm]'
'0,31:1.04 MOTOR SPEED [rpm]'
'0,31:1.08 MOTOR TORQUE [%]'
'0,31:25.04 TORQUE REF B [%]'};
regexp(a,'(?<=\d\.\d{2}\s+).*','match','once')
参考
カテゴリ
Help Center および File Exchange で Motor Drives についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!