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:
pass the parameter in dde23 function

Subject: pass the parameter in dde23 function

From: amit sharma

Date: 10 Jul, 2010 11:17:13

Message: 1 of 2

Dear sir

i have a function file ross.m, which have a parameter K in it.
I call that function in by function sol=dde23('ross',
[tau,tau,tau],rand(9,1),[0,1000]);

I want pass parameter K in ross function by using the dde23
function.

How to do this ?

Subject: pass the parameter in dde23 function

From: Steven Lord

Date: 12 Jul, 2010 14:49:42

Message: 2 of 2


"amit sharma" <sharma.a28@gmail.com> wrote in message
news:0e57139e-afb6-4bed-92fb-16181be8d316@h40g2000pro.googlegroups.com...
> Dear sir
>
> i have a function file ross.m, which have a parameter K in it.
> I call that function in by function sol=dde23('ross',
> [tau,tau,tau],rand(9,1),[0,1000]);
>
> I want pass parameter K in ross function by using the dde23
> function.
>
> How to do this ?

Use an anonymous function.

k = 17;
sol = dde23(@(t, y, z) ross(t, y, z, k), ...

--
Steve Lord
slord@mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Tags for this Thread

No tags are associated with 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