|
Size: 948
Comment: Plotting a graph for given function
|
← Revision 3 as of 2010-12-18 07:12:43 ⇥
Size: 908
Comment:
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 8: | Line 8: |
| A=matrix([[1,3,3,3],[5,10,-2,-20],[3,5,10,2],[1,0,0,9]]) | |
| Line 9: | Line 10: |
| A=matrix([[1,3,3,3],[5,10,-2,-20],[3,5,10,2],[1,0,0,9]]) | |
| Line 15: | Line 15: |
| Line 36: | Line 35: |
| * <Your Name>, <Profession>, <Organization> * <Your Name>, <Profession>, <Organization> |
* <T.R.N.Karthik>, <Student>, <Gitam University> |
Book
Getting started with MATLAB
Author
Rudra Pratap
Edition
A=matrix([[1,3,3,3],[5,10,-2,-20],[3,5,10,2],[1,0,0,9]])
print "Given matrix A is:\n",A
print "Function f(x) is defined as f(x)=sin(x)*cos(x)+0.5"
f(x)=sin(x)*cos(x)+0.5
print "The limits in which x should be plotted are given as :(1,6*pi) "
print "Plot statement used to plot the given graph is: plot(f(x),(x,1,6*pi))"
plot(f(x),(x,1,6*pi))
Result:
Given matrix A is:
[ 1 3 3 3]
[ 5 10 -2 -20]
[ 3 5 10 2]
[ 1 0 0 9]
Function f(x) is defined as f(x)=sin(x)*cos(x)+0.5
The limits in which x should be plotted are given as :(1,6*pi)
Plot statement used to plot the given graph is: plot(f(x),(x,1,6*pi))
Solution by:
<T.R.N.Karthik>, <Student>, <Gitam University>
