Some Great Thoughts

"Go ahead and do your best" | "It is the simple things in life that build brilliance in creativity..simplicity cannot be taught, it is not tamper with it" | "All men dream but not equally. Those who dream by night in the dusty recesses of their minds wake in the day to find that it was vanity; but the dreamers of the day are dangerous men, for they may act their dream with open eyes to make it possible" | "इच्छा हमेशा योग्यता को हरा देती है" | "If you think you can do a thing or think you can't do a thing, you're right. -Henry Ford" | "Failure is success if we learn from it. -Malcolm S. Forbes" | "The future belongs to those who believe in the beauty of their dreams. -Eleanor Roosevelt" | "The great men and women of history are remembered, not because they never made mistakes or never failed, but because they didn't let their failures stop them. They kept on until they succeeded" | "असफलता हमें सिखाती है कि सफलता का प्रयत्न पूरे मन से नहीं किया गया"

Friday, December 30, 2011

Programming in MATLAB for Beginners-5

Now move a step ahead towards high level programming in MATLAB:

Is it possible to make large programs & store our codeings on MATLAB?????
Answer is YES........
with the help of editor
Editors: editors are use for store the cods or set of instructions. we can run our code or program stored in editor any time. editor create a M-File with the extension " .m ".
to open editor just type " edit " on your command window, you will get a new window. 
There are two types of M-File:
  1. Script Files
  2. Function File
Script File: Script files are set of codes & instructions. we can say scripts are simplest kind of M-File. a script file contain a whole as well as a part of any program. we can run any program directly from editor. the output will shown on command window.
to call any script file just type the name of file on command window.

Function File: MATLAB has many inbuilt functions like sin, cos etc. but some time we need a function which is not inbuilt in MATLAB. to create such functions we also use editors. once we create a function, we can call it any time in our program.

always remember the name of any M-File must not be same as any inbuilt function or command in MATLAB.

No comments:

Post a Comment