The following code
>>system('WMIC CPU Get NumberOfLogicalProcessors')
prints
NumberOfLogicalProcessors
8
How can I store this number (8) in a variable?

 채택된 답변

JESUS DAVID ARIZA ROYETH
JESUS DAVID ARIZA ROYETH 2019년 11월 11일

0 개 추천

solution:
[status,result]=system('WMIC CPU Get NumberOfLogicalProcessors');
number = str2double(regexp(result, '\d+', 'match'))

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Text Data Preparation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by