convertconditional.m

来自「student teacher and proferssor llove thi」· M 代码 · 共 26 行

M
26
字号
function str=convertconditional(str)goon=1;temp=findstr(str,'~=');while ~isempty(temp) str=[str(1:temp(1)-1),'/=',str(temp(1)+2:length(str))]; temp=findstr(str,'~=');endtemp=findstr(str,'~');while ~isempty(temp) str=[str(1:temp(1)-1),'.not.',str(temp(1)+1:length(str))]; temp=findstr(str,'~');endtemp=findstr(str,'|');while ~isempty(temp) str=[str(1:temp(1)-1),'.or.',str(temp(1)+1:length(str))]; temp=findstr(str,'|');endtemp=findstr(str,'&');while ~isempty(temp) str=[str(1:temp(1)-1),'.and.',str(temp(1)+1:length(str))]; temp=findstr(str,'&');end

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?