if statement is not implemented.
3 次查看(过去 30 天)
显示 更早的评论
hello i need to solution
workspace in guide has conncect 10,9,8... z_10,z_9.... , and all things
this is pushbutton Callback function
but push -> not implemented and error
and result is Z1 = [] ; Z2 = []; ... Z10 = [] same result
but command window is implemented ex ) Z1 = [ 0 1; 2931 2] ...
what is problem?
Z10
if connect10 == 1
Z10=total_parasite*z_10;
elseif connect10 == 0
Z10 =(abs(total_parasite))*(abs(z_020)+abs(z_10));
end
assignin('base','Z10',Z10)
Z9
if connect9 == 1
Z9=Z10*z_9;
elseif connect9 == 0
Z9 = abs(Z10)*(abs(z_019)+abs(z_9));
end
assignin('base','Z9',Z9)
Z8
if connect8 == 1
Z8=Z9*z_8;
elseif connect8 == 0
Z8 = Z9*(abs(z_018)+abs(z_8));
end
assignin('base','Z8',Z8)
Z7
if connect7 == 1
Z7=Z8*z_7;
elseif connect7 == 0
Z7 = Z8*(abs(z_017)+abs(z_7));
end
assignin('base','Z7',Z7)
Z6
if connect6 == 1
Z6=Z7.*z_6;
elseif connect6 == 0
Z6 = Z7.*(abs(z_016)+(z_6));
end
assignin('base','Z6',Z6)
Z5
if connect5 == 1
Z5=Z6*z_5;
elseif connect5 == 0
Z5 = Z6*(abs(z_015)+(z_5));
end
assignin('base','Z5',Z5)
Z4
if connect4 == 1
Z4=Z5*z_4;
elseif connect4 == 0
Z4 = Z5*(abs(z_014)+abs(z_4));
end
assignin('base','Z4',Z4)
Z3
if connect3 == 1
Z3=Z4*z_3;
elseif connect3 == 0
Z3 = Z4*(abs(z_013)+abs(z_3));
end
assignin('base','Z3',Z3)
Z2
if connect2 == 1
Z2 = Z3*z_2;
elseif connect2 == 0
Z2 = Z3*(abs(z_012)+abs(z_2));
end
assignin('base','Z2',Z2)
Z1
if connect1 == 1
Z1 = Z2*z_1;
elseif connect1 == 0
Z1 = Z2*(abs(z_011)+abs(z_1));
end
assignin('base','Z1',Z1)
3 个评论
Rik
2023-2-13
I haven't seen that function being used where there weren't better alternatives.
But you didn't answer my second question: what are you trying to do?
Since you mention GUIDE: For general advice and examples for how to create a GUI (and avoid using GUIDE), have look at this thread. All advice there (except AppDesigner) is applicable to R2015b.
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Migrate GUIDE Apps 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!