Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
input simulink

Subject: input simulink

From: Azrul

Date: 4 Dec, 2010 12:50:08

Message: 1 of 1


I've made some simulink diagram that produces mdotx and TM somewhere in the line. Then I want to use this as the input in funtion 'calc_PE'.

'calc_PE.m' is a Matlab function that is wrote in Matlab that basically tells :

PE=calc_PE(mdotx, TM, constant)

I can insert this 'calc_PE' in the Simulink by using 'Matlab Function' block, but how do I put the inputs ie mdotx, TM and constant ? I've put 'simout to Workspace' at the line of mdotx and TM (assuming that this is the correct way to do this), but I don't know how to call it back for the calc_PE

And one more question, what's the purpose of 'Clock' block ? I assume that if I want to run the simulation for 10s, i just have to put '10' besides the 'stop simulation' button. It has nothing to do with 'Clock' is it ?

Thanks in advance

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us