From: Prashant Sandhi on 23 Feb 2010 09:35 Dear friends, I want to display a message or value 'zero' when my condition is false. Simulink: If condition block(I dont want to use else condition) If (u1<0.00019) ( Before this if condition I am doing u1-u2=0 and if true Action block (Embedded Matlab function): function y = fcn(u) %#eml y = ((0.297/(u+u))-1)*(10000+1000000); If not true: When condition is not true I am getting 'inf' display as I am simulating under 'inf' but how can I make the display '0' or any message instead of 'inf'? any suggestion will be appriciated Sandhi
From: Oleg Komarov on 23 Feb 2010 10:10 "Prashant Sandhi" <sanddhi7(a)gmail.com> wrote in message <hm0p37$hvp$1(a)fred.mathworks.com>... > Dear friends, > > I want to display a message or value 'zero' when my condition is false. > > Simulink: > If condition block(I dont want to use else condition) > > If (u1<0.00019) ( > Before this if condition I am doing u1-u2=0 and if true > > Action block (Embedded Matlab function): > > function y = fcn(u) > %#eml > > y = ((0.297/(u+u))-1)*(10000+1000000); > > > If not true: > > When condition is not true I am getting 'inf' display as I am simulating under 'inf' > but how can I make the display '0' or any message instead of 'inf'? > > any suggestion will be appriciated > Sandhi Not clear. Oleg
From: Prashant Sandhi on 23 Feb 2010 10:47 I got the solution Mr.Oleg. Still I Thank you for your reply. have a good day. "Oleg Komarov" <oleg.komarovRemove.this(a)hotmail.it> wrote in message <hm0r4u$16b$1(a)fred.mathworks.com>... > "Prashant Sandhi" <sanddhi7(a)gmail.com> wrote in message <hm0p37$hvp$1(a)fred.mathworks.com>... > > Dear friends, > > > > I want to display a message or value 'zero' when my condition is false. > > > > Simulink: > > If condition block(I dont want to use else condition) > > > > If (u1<0.00019) ( > > Before this if condition I am doing u1-u2=0 and if true > > > > Action block (Embedded Matlab function): > > > > function y = fcn(u) > > %#eml > > > > y = ((0.297/(u+u))-1)*(10000+1000000); > > > > > > If not true: > > > > When condition is not true I am getting 'inf' display as I am simulating under 'inf' > > but how can I make the display '0' or any message instead of 'inf'? > > > > any suggestion will be appriciated > > Sandhi > > Not clear. > > Oleg
|
Pages: 1 Prev: Problems with updating figure callbacks in r2009a Next: Bug in datevec |