すべてが'else'になる
显示 更早的评论
現在、if文を使用して条件づけを行い、分岐させています。
しかし、どの条件でもelseの分岐'偽'になってしまいます。
試しに、if-else-endを消して実行すると'真'に分岐します。
こうした時、何が原因となっているのでしょうか
%moziは22×1のcell
%辞書の読み込み
jisho = readtable('dictionary.xlsx','ReadRowNames',true);
Chushutumoji=moji{1,1};
%条件分岐
if sum(categorical(true) == Chushutumoji)
Shoukai = jisho(Chushutumoji,:);
disp(Shoukai)
else
disp('False')
end
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 table 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!