Why help on 'str' yield help on 'std'?
1 次查看(过去 30 天)
显示 更早的评论
Hi all,
When I want to check if a name for a new variable I want to use is already part of Matlab language I just seek help on that word (hopping to get 'word' not found). I guess this is a common practice.
I tried to use this technique with the word 'Str' (short name for a string) and got help on the known function 'std'. Either it is a bug or part of Matlab attempt to guess typos. In both cases, it doesn't help...
Is it a typo correction? Is it a bug?
Thanks,
Alon
1 个评论
Walter Roberson
2017-1-29
Yes, occasionally MATLAB does clean up typos or redirect one word to the MATLAB equivalent of that concept. On occasion (not often) I have seen it direct to help that contained a copy of the word I had typed in.
采纳的回答
Stephen23
2017-1-29
编辑:Stephen23
2017-1-29
which str
which str -all
For example:
>> which str
'str' not found.
>> which std
C:\Program Files\MATLAB\R2010b\toolbox\matlab\datafun\std.m
3 个评论
Stephen23
2017-1-29
@Alon Rozen: I suspect that help is trying to, err, help, by providing some spelling correction.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Characters and Strings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!