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:
importing excel values into simulink

Subject: importing excel values into simulink

From: hari

Date: 2 Dec, 2010 02:54:05

Message: 1 of 3

I had developed a starter motor model (d.c series motor)in simulink, in which the load torque is varied with respective time. How to give a load torque w.r.t time.
i had imported a excel file into mat workspace. it has 75 values. i need to give these values w.r.t time in simulink model. how to give?

Subject: importing excel values into simulink

From: Paulo Silva

Date: 9 Dec, 2010 00:26:22

Message: 2 of 3

"hari " <rhn.engg@lucastvs.co.in> wrote in message <id71oc$snd$1@fred.mathworks.com>...
> I had developed a starter motor model (d.c series motor)in simulink, in which the load torque is varied with respective time. How to give a load torque w.r.t time.
> i had imported a excel file into mat workspace. it has 75 values. i need to give these values w.r.t time in simulink model. how to give?

I don't really know how to change torque but here's one example on how to change something on a simulink simulation in real time

%open your model, you can also use load_system if you don't want to see it
open_system('ModelName')

%start the simulation
sim('ModelName');

%make a loop so you can send all values to model, use the for function

%send current Value to your motor
set_param('ModelName/Step','After',num2str(Value));

%wait some time if you want with the pause function
%next Value if the current one isn't the final

Subject: importing excel values into simulink

From: hari

Date: 9 Dec, 2010 03:05:22

Message: 3 of 3

Thanks

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