Info
此问题已关闭。 请重新打开它进行编辑或回答。
how can i convert a string to a number (without using the str2num function) so if the string represents a number the value is 1? (otherwise the value is 0)...
1 次查看(过去 30 天)
显示 更早的评论
for example:
st = '23487';
r = 1;
(also '00023487' is acceptable or any number of leading zeros).
but
st = '-4e';
r = 0;
1 个评论
Daniel Shub
2012-11-23
I am closing this question. Please edit it to include what you have tried so far.
回答(2 个)
此问题已关闭。
另请参阅
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!