Prev: Matlab Embedded function
Next: Generating code with precompiler constructs using RTW Embedded coder
From: dontgive dontgiveeither on 23 Jun 2010 04:44 Hello, I'd like an information about using the "Embedded Matlab Function" on Simulink. http://img229.imageshack.us/f/schmasimulink.jpg/ Citation: function [out1, out2] = p(in1, in2, in3, in4, t) if in1 && in2 && in4 %reference>0 & carrier>0 & ref=carrier tc1=t; % t is actually is the clock, when conditions above are true then we keep this time and we obtain out1 = false; out2 = false; %both instructions are true until tc1+short-time then %out1 = false; %out2 = true; else if in1 && in3 && in4 %reference>0 & carrier<0 & ref=carrier %tc2=t; out1 = false; out2 = false; %both instructions are true until tc2+short-time then out1 = true; out2 = false; end end questions: - I'd like to use the clock in my Embedded Matlab Function but it doesn't work - I dont find how to make an instruction of this type: out1 = false; out2 = false; % when t=tc2+short-time THEN out1 = true; out2 = false; Thanks for your help.
|
Pages: 1 Prev: Matlab Embedded function Next: Generating code with precompiler constructs using RTW Embedded coder |