Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

M-file's initial parameters in Simulink

Status
Not open for further replies.

HAIDE

Junior Member level 3
Joined
Feb 9, 2012
Messages
27
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
GERMANY
Activity points
1,525
255.png
Dear all,
I used m-file on Simulink by Matlab Function as shown in attached pic, In m-fie I write a code with parameters that need to have initialize value , for example the code is:

HTML:
function out=control(in)
rin=in(1);
       for j=1:1:6
          h(j)=exp(-norm(x-ci(:,j))^2/(2*bi(j)*bi(j)));
       end
x(1)=h;
x(2)=rin;
 
 it is needed to set initial value fr x as [0 , 0], but how is possible in Simulink?
 

i would suggest you to move on to level-2 m-file function blocks in simulink to have better control over these kind of stuffs.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top