strcmp isn't comparing properly
显示 更早的评论
I'm having trouble figuring out why the strcmp is providing an incorrect output when comparing PSymbol and symbol. The two cells are identical but when comparing strcmp(PSymbol,symbol) it should return a 1 and change location to 1 but it is not. Please help.
% Find the location in the table where symbols are matched
% Symbol is supposed to be unique in P
if strcmp(PSymbol,symbol)
location = i;
% If sides are opposite, flag as a closing transaction
if strcmp(side,oppSide1)
open = 0;
end
end
Ive attached the code and the .mat file. Please help.
采纳的回答
更多回答(1 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Operations on Strings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!