(read "matlab what is it used for " first)
the white area in the middle is the work area in which the user types in the commands which are interpreted directly over there and results are displayed on the screen. >> is the matlab prompt indicating that user can type in the commands here...a previously entered command can be reached with the help of up-arrow and down-arrow
In this article the things that u need to type in matlab command window are put in " ". please do open matlab , type them and match the results
it will help u in learning faster.
Simple commands:
Type this is the work area and press enter
>>" 3ˆ2 - (5 + 4)/2 + 6*3"Type this is the work area and press enter
this will result in
ans =
22.5000
matlab defines a new variable "ans" as ur result and u can use it again newhere
chk these examples these will make u understand every basic command u need to know in matlab
Example 1:
To perform symbolic computations, you must use syms to declare the variables
you plan to use to be symbolic variables.
>>" syms x y"
>> "(x - y)*(x - y)ˆ2"
this will result in
ans =
(x-y)^3
>>" expand(ans)"
this will result in
ans =
x^3-3*x^2*y+3*x*y^2-y^3
>>" factor(ans)"
this will result in
ans =
(x-y)^3
Read More >>
