How to store text printed to console?
1 view (last 30 days)
Show older comments
Abdul Basith Ashraf
on 11 Nov 2019
Answered: JESUS DAVID ARIZA ROYETH
on 11 Nov 2019
The following code
>>system('WMIC CPU Get NumberOfLogicalProcessors')
prints
NumberOfLogicalProcessors
8
How can I store this number (8) in a variable?
0 Comments
Accepted Answer
JESUS DAVID ARIZA ROYETH
on 11 Nov 2019
solution:
[status,result]=system('WMIC CPU Get NumberOfLogicalProcessors');
number = str2double(regexp(result, '\d+', 'match'))
0 Comments
More Answers (0)
See Also
Categories
Find more on Whos in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!