Prev: Text in plot
Next: FIT function does not work in parfor
From: Kyle on 19 May 2010 09:44 Hey all, I am using command line matlab and just getting into matlab programming. I have a function called filecat that I wrote to concatenate the contents of data files. Now I want to be able to tell it which files to cat at runtime, something like >>filecat 15 would concatenate the files associated with the number 15. Can someone tell me what I need to do in the program to have the number 15 available to it while it runs if it were called like that?
From: Wayne King on 19 May 2010 10:01 "Kyle " <kbrig035(a)uottawa.ca> wrote in message <ht0pv4$gj9$1(a)fred.mathworks.com>... > Hey all, > > I am using command line matlab and just getting into matlab programming. I have a function called filecat that I wrote to concatenate the contents of data files. Now I want to be able to tell it which files to cat at runtime, something like > > >>filecat 15 > > would concatenate the files associated with the number 15. Can someone tell me what I need to do in the program to have the number 15 available to it while it runs if it were called like that? Hi Kyle, that all depends on how you wrote your program filecat.m A typical case would be to specify an input argument, or input arguments, to filecat.m in the function line, so that your program would be called >>filecat(15) from the command line. Welcome to Matlab. You should invest some time in reading the documentation. Read the Matlab Getting Started Guide -> Programming -> Scripts and Functions Wayne
From: Kyle on 19 May 2010 10:04 Resolved
|
Pages: 1 Prev: Text in plot Next: FIT function does not work in parfor |