help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FUNCTIONS CALLING FUNCTIONS


From: Oscar Bayona Candel
Subject: FUNCTIONS CALLING FUNCTIONS
Date: Wed, 6 Aug 2008 23:24:10 +0200

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.
 
Thanks in advance I hope tobe explainning right.
 
Best regards to all.

 


¡Sé solidario, haz clic! Por cada búsqueda que hagas desde Windows Live Search, estarás ayudando a los que más lo necesitan Un clic solidario

reply via email to

[Prev in Thread] Current Thread [Next in Thread]