Save bash output in matlab cell array
1 回表示 (過去 30 日間)
古いコメントを表示
Hello all,
I need to extract certain values from a text file and have been using the following bash command:
awk 'NR==41,NR==56 {print $1}' Filename.txt
I'd like to be able to save the output from this command, for example:
onsets{1}= output_from_awk_command
Is there a way I can either run this command through matlab and then save the value to part of my cell or print these values via bash into the matlab window? I would like to avoid the extra step of saving the awk output and then loading it in matlab to save.
Suggestions?
0 件のコメント
採用された回答
Jan
2013 年 6 月 13 日
What about this:
[status,cmdout] = system('wk ''NR==41,NR==56 {print $1}'' Filename.txt')
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Logical についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!