FUNCTIONS CALLING FUNCTIONS
John W. Eaton
jwe at bevo.che.wisc.edu
Wed Aug 6 16:56:59 CDT 2008
On 6-Aug-2008, Oscar Bayona Candel wrote:
|
| Hi all,
|
| I want to type in the command window a function that when called execute a number of functions included inside it.
|
| For example:
|
| I want to create a function "principal.m" that the only thing that makes it to call a number of function called "example1.m","example2.m",..."example30.m"
|
| Any of this function hasn´t arguments to be called like "example1(a,b).m" the only purpose is to run "principal.m" in the command window and that in the window appear the results from executing each "example1.m",...and so on.
|
| My example1.m, example2.m...example30.m executed one by one output a 4 vectors result. So if I have 30 function to be called I will have 30*4 vectors on the output screen when I execute "principal."
|
|
| "example" function use the suggested
| for i=1:4
| "A=load (sprintf ("ff%d", i));end
|
| I want to obtain a similar procedure to this:
|
| I.e. (I know it is wrong example of course")
|
| function principal.m
|
| for j=1:30
|
| run("example%d.m",j")
|
| clear all
|
| end
|
| So if I type principal.m all the results from executing each example function will appear in order.
Try
help feval
jwe
More information about the Help-octave
mailing list