Got Questions? Get Answers.
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:
user defined functions in matlab

Subject: user defined functions in matlab

From: ananda

Date: 24 Jan, 2010 11:07:03

Message: 1 of 2

like in C can i able to write functions in matlab and call those functions in same file...
how to call a source file in another program.....

Subject: user defined functions in matlab

From: Wayne King

Date: 24 Jan, 2010 11:57:02

Message: 2 of 2

"ananda " <anandabalan_s89@rediff.com> wrote in message <hjh9kn$cg3$1@fred.mathworks.com>...
> like in C can i able to write functions in matlab and call those functions in same file...
> how to call a source file in another program.....

yes, Ananda, you can define local functions inside of a Matlab function. You can also call other functions (defined outside the calling function) if those functions exist on your path so Matlab can find them. Look at

>>doc path

>>doc addpath

Wayne

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