Matlab question: Returning a value in the middle of a function

Hey guys.

I have the following statement

a = func(b,c,d,e);

this function runs for 100 ml sec for example, I want to return a value each 20 ml sec, I mean to update the variable a each 20 ml sec without interrupting the function.

Is that possible?

Thanks a lot.

Assaf.

Re: Matlab question: Returning a value in the middle of a function

Quote:

Originally Posted by

**asi123** Hey guys.

I have the following statement

a = func(b,c,d,e);

this function runs for 100 ml sec for example, I want to return a value each 20 ml sec, I mean to update the variable a each 20 ml sec without interrupting the function.

Is that possible?

Thanks a lot.

Assaf.

You will need to be more specific, and set the function up to do this.

CB

Re: Matlab question: Returning a value in the middle of a function

Hey.

The problem is that I don't control the statement

a = func(b,c,d,e);

I can only control func. Is there a command in matlab which can return a value from a function without interrupting it?

Thank you very much.

Assaf.

Re: Matlab question: Returning a value in the middle of a function

Quote:

Originally Posted by

**asi123** Hey.

The problem is that I don't control the statement

a = func(b,c,d,e);

I can only control func. Is there a command in matlab which can return a value from a function without interrupting it?

Thank you very much.

Assaf.

As I said before be more specific. What is the function, and what do you want returned?

CB

Re: Matlab question: Returning a value in the middle of a function

I found a solution.

I use the function assignin.

Thank you very much.

Assaf.