Matlab4all
MATLAB which means matrices of library developed by MathWorks is a leading numerical computing programming language .It is famous nowadays especially in mathematical analysis.In past FORTRON used to be the leading programming language but due to increase in its complexity with increase in precise calculation made it lag behind MATLAB
MATLAB does work of calculator !
Now we are familiar with the MATLAB environment, let's move forward towards working on what have we learned.
Whenever we think of designing of something, the first and foremost thing which we feel as challenging is the calculation part. With increase in precision the complexity increases . MATLAB does these calculations in twinkling of an eye.
Let's see how -
Here am inserting a image as an example -
Whenever we think of designing of something, the first and foremost thing which we feel as challenging is the calculation part. With increase in precision the complexity increases . MATLAB does these calculations in twinkling of an eye.
Let's see how -
Here am inserting a image as an example -
MATLAB - basics
GET https://www.googleapis.com/blogger/v3/blogs/blogId/posts
Lets start from scratch and explore the functions and tools especially which are useful in designing circuits and their analysis.
There is a most beautiful command available for a layman so called 'help'.
Lets start from scratch and explore the functions and tools especially which are useful in designing circuits and their analysis.
There is a most beautiful command available for a layman so called 'help'.
This is the most beautiful command of the matlab where you can learn about anything you are willing to know
help, by itself, lists all primary help topics. Each primary topic corresponds to a folder name on the MATLAB search path.
Some classes require that you specify the package name. Events, properties, and some methods require that you specify the class name.
Syntax is as follows -
help CLASSNAME.NAME
eg,
help close help for the CLOSE function
help fprintf help for printing (PRINT function) output
Lets get familiar with MATLAB work environment first.
In matlab we can edit and see the output on the same window. So before proceeding to coding lets see the different windows and their nomenclature .
The fig below shows the windows and their names(source : matlab)-
Function catalogue is something where you can get all the list of installed products and the supported functions. On clicking on it , there opens a list containing list of toolbox,softwares installed etc.
Next comes the workspace which displays the workspace browser. To open workspace simply type 'workspace' in command window and it opens.It enlists variables used in a function.
Command history enlists the commands entered by the user as shown in fig below -
Directory contents and file details opens the directory list and file located . Use cd in command windows to view current directory where list of files are located or saved. Use open option to view the file.
Another most important window which opens where we can write predefined or user-defined functions called 'editor window' .For writing functions in this windows, we need to enter 'edit' in command window and you can write your function in it -
As rule of function,we have to save in name of file with name of function and using extension '.m'
As i havent saved file name, in the above image there is a error displaying in red colour, Let me save the file name with the function name and proceed-
Once it is saved, i can run my function and it displays output - Hello
Use \n to format the word hello.
Notice the green and red coloured square box on the right end, These colours actually indicates the correctness of code .
Subscribe to:
Posts (Atom)