在matlab和m中的新尝试从MATLAB输入gui将由用户输入并将该句子分成单词,但我需要把它们作为字母,因为我使用机器人写他们。这封信将发送给这些机器人。我使用两个机器人,例如当我按下按钮matlab函数时,在文本中输入'lou reed'时,将这2个单词保存到不同的字符数组中,以便我可以将字母c(i)这样写入并发送给处理。迄今为止,我写了这些,但ım卡住了。matlab将句子分成单词
c = char(get(handles.edit1,'String'));
int count1;
int count2;
char word1;
char space=" ";
for i=1:length(c)
int t = isequal(c(i),space);
if(t==0)
count1=count1+1;
word1=;%ım trying to add the char here to find the new word
else
end
end
我不知道该怎么办ı搜索但我找不到有用的可能ı看起来不正确。 什么将是有益的,thankss
这很好,谢谢 – amadeus