SlideShare a Scribd company logo
1 of 18
Download to read offline
CONTENTS
 Introduction
 History
 Issues of matlab users
 Technical Details
 Some useful OCTAVE commands
 Introduction to Matrix
 Array , Vector and Matrix
 Plotting
 Functions
 Scripts
 Difference between Matlab And Octave
INTRODUCTION
 High level programming language
 Open Source Implementation
 Available in Linux and Windows
 Distributed in GPL(Gnu Public License)
 Designed for matrix computations
HISTORY
The project was conceived around 1988 . At first it was
intended to be a companion to a chemical reactor design
course. Real development was started by John W. Eaton in
1992. The first alpha release dates back to January 4, 1993 and
on February 17, 1994 version 1.0 was released. Version 4.0.0
was released on May 29, 2015. The latest version 5.1.0 of GNU
octave was released on March 1,2019.
ISSUES FOR MATLAB USERS
Licensing – Octave is free
Multi-processor and cluster
64-bit systems and large memory (> 2GB)
Lack of GUI support
Compatibility/portability issues with other analysis packages (e.g., R)
Speed (we need to convert more .m files to C++)
TECHNICAL DETAILS
 Written in C++ using the C++ standard library.
 Uses an interpreter to execute the Octave scripting language.
 Octave interpreter has an OpenGL-based graphics engine to create
plots, graphs and charts and to save or print them.
 Octave includes a Graphical User Interface (GUI) in addition to the
traditional Command Line Interface (CLI).
SOME USEFUL OCTAVE COMMANDS
 who List Known variables
 whos List known variables plus their size
 help help in finding any command
 clear Clear all variables from workspace
 clear x y Clear variables x and y from workspace
 clc Clear the command windows
 ver Display the information of version of OCTAVE
 exit quit from OCTAVE session
INTRODUCTION TO MATRIX
Creating a Matrix
Simply type:
octave:1> A = [8, 2, 1; 3, -1, 4; 7, 6, -5]
Octave will respond with a matrix in pretty-print:
A =
8 2 1
3 -1 4
7 6 -5
Indexing
Always "row before column"!
aij = A(i,j) Get an element
r = A(i,:) Get a row
c = A(:,j) Get a column
B = A(i:k,j:l) Get a submatrix
Useful indexing command end :
octave:1> data = [4 -1 35 9 11 -2];
octave:2> v = data(3:end) ;
v =
35 9 11 -2
ARRAYS, VECTORS, AND MATRICES
Array :
A collection of data elements
arranged in rows and columns
C={1 , 2 , 3; 4 , 5 , 6};
Vector:
A one-dimensional array (single row or
single column of data elements)
Matrix :
A two-dimensional array (more than
one row and/or column of data
elements)
>> A=[1;9]
>> B=[1;8;3;7]
>> C=[1:3; 4:6; 7:9]
row or column?
column vector
C =
1 2 3
4 5 6
7 8 9
PLOTTING
Plotting in 2D
 plot(x,cos(x)) Display x,y-plot
Creates automatically a figure window. Octave uses gnu plot to
handle graphics.
 figure(n) Create figure window 'n'
If the figure window already exists, brings it into the foreground
(makes it the current figure)
 figure Create new figure window with
identifier incremented by 1
EXAMPLE OF PLOTTING
>> x=0:pi/100:2*pi;
>> y1=sin(2*x);
>> y2=2*cos(2*x);
>>plot(x,y1);
>> hold on;
>> plot(x,y2);
FREQUENT COMMANDS
▪ clf Clear figure
▪ hold on Hold axes. Don't replace plot with
new plot, superimpose plots
▪ grid on Add grid lines
▪ grid off Remove grid lines
▪ title('Exp1') Set title of figure window
▪ xlabel(‘label name ') Set label of x-axis
▪ ylabel(‘label name') Set label of y-axis
▪ subplot Put several plot axes into figure
LINE SPECIFIERS
Line Style Specifier
Solid(Default) -
Dashed --
Dotted .
Dash-dot -.
Line color Specifier
Red r
Green g
Blue b
Cyan c
Magenta m
Yellow y
Black k
White w
Ex : Find the response to an input of 5u(t).
Given that amplitude of step input is 5 .
Program:
Sys1=tf([1 1 ]*5,[4 4])
Sys2=tf([1]*5,[4 1])
Step(sys,1);
Hold on;
Step(sys,2)
FUNCTIONS
Functions and their m-File
▪ When putting a function into its m-file, the name of that file must be the
same as the function name plus the .m extension.
Examples: calcmoments.m, findfirstpeak.m
▪ To call a function, type its name without the .m extension. Example:
[bool i] = findfirstpeak(myreadings, 0.3);
▪ Comments in Octave/Matlab start with % .
SCRIPTS
Scripts
▪ The second type of m-files is called script. Again, Octave scripts
are text files with an
.m extension.
▪ Scripts contain executable code. They are basically the "main"
programs.
▪ Execute a script by typing its name without the .m extension!
Example: octave:1> LocalizeRobot
DIFFERENCE BETWEEN MATLAB AND
OCTAVE
The Basic Comparison
between Matlab vs Octave
Matlab Octave
Definition It is a matrix laboratory, referred
to as language used for technical
computing.
It is programming language used
for numerical computing.
Programmed It was written in C, C++ and Java
programming language.
It was written in C, C++ and
Fortran Language.
Interface It has better interface
comparatively.
Its interface is not that good as
MATLAB is having.
RAM It consumes more RAM as
compared to Octave.
It consumes less RAM than
MATLAB.
Free It is not free It is free
THANK YOU

More Related Content

What's hot

Knowledge Engineering in FOL.
Knowledge Engineering in FOL.Knowledge Engineering in FOL.
Knowledge Engineering in FOL.Megha Sharma
 
Design and Implementation of Boolean Functions using Multiplexer and also usi...
Design and Implementation of Boolean Functions using Multiplexer and also usi...Design and Implementation of Boolean Functions using Multiplexer and also usi...
Design and Implementation of Boolean Functions using Multiplexer and also usi...IRJET Journal
 
Fuzzy set and its application
Fuzzy set and its applicationFuzzy set and its application
Fuzzy set and its applicationKalaivananRaja
 
santosh kumar fuzzy logic presentation
santosh kumar   fuzzy logic presentationsantosh kumar   fuzzy logic presentation
santosh kumar fuzzy logic presentationAkash Maurya
 
Differential kinematics robotic
Differential kinematics  roboticDifferential kinematics  robotic
Differential kinematics roboticdahmane sid ahmed
 
NFA Non Deterministic Finite Automata by Mudasir khushik
NFA Non Deterministic Finite Automata by Mudasir khushikNFA Non Deterministic Finite Automata by Mudasir khushik
NFA Non Deterministic Finite Automata by Mudasir khushikMudsaraliKhushik
 
Real time operating system
Real time operating systemReal time operating system
Real time operating systemBharti Goyal
 
Fuzzy relations
Fuzzy relationsFuzzy relations
Fuzzy relationsnaugariya
 
Laplace Transformation & Its Application
Laplace Transformation & Its ApplicationLaplace Transformation & Its Application
Laplace Transformation & Its ApplicationChandra Kundu
 
AUTOMATA THEORY - SHORT NOTES
AUTOMATA THEORY - SHORT NOTESAUTOMATA THEORY - SHORT NOTES
AUTOMATA THEORY - SHORT NOTESsuthi
 
Knowledge based agents
Knowledge based agentsKnowledge based agents
Knowledge based agentsMegha Sharma
 
Pumping lemma for regular language
Pumping lemma for regular languagePumping lemma for regular language
Pumping lemma for regular languagesadique_ghitm
 
Over view of Laplace Transform and its Properties
Over view of Laplace Transform and its Properties Over view of Laplace Transform and its Properties
Over view of Laplace Transform and its Properties Neel Shah
 

What's hot (20)

Knowledge Engineering in FOL.
Knowledge Engineering in FOL.Knowledge Engineering in FOL.
Knowledge Engineering in FOL.
 
Design and Implementation of Boolean Functions using Multiplexer and also usi...
Design and Implementation of Boolean Functions using Multiplexer and also usi...Design and Implementation of Boolean Functions using Multiplexer and also usi...
Design and Implementation of Boolean Functions using Multiplexer and also usi...
 
Fuzzy set and its application
Fuzzy set and its applicationFuzzy set and its application
Fuzzy set and its application
 
santosh kumar fuzzy logic presentation
santosh kumar   fuzzy logic presentationsantosh kumar   fuzzy logic presentation
santosh kumar fuzzy logic presentation
 
Differential kinematics robotic
Differential kinematics  roboticDifferential kinematics  robotic
Differential kinematics robotic
 
Fuzzy logic
Fuzzy logicFuzzy logic
Fuzzy logic
 
NFA Non Deterministic Finite Automata by Mudasir khushik
NFA Non Deterministic Finite Automata by Mudasir khushikNFA Non Deterministic Finite Automata by Mudasir khushik
NFA Non Deterministic Finite Automata by Mudasir khushik
 
Ricatti Equation
Ricatti EquationRicatti Equation
Ricatti Equation
 
Np hard
Np hardNp hard
Np hard
 
Lisp
LispLisp
Lisp
 
Classical Planning
Classical PlanningClassical Planning
Classical Planning
 
Real time operating system
Real time operating systemReal time operating system
Real time operating system
 
Fuzzy relations
Fuzzy relationsFuzzy relations
Fuzzy relations
 
Laplace Transformation & Its Application
Laplace Transformation & Its ApplicationLaplace Transformation & Its Application
Laplace Transformation & Its Application
 
AUTOMATA THEORY - SHORT NOTES
AUTOMATA THEORY - SHORT NOTESAUTOMATA THEORY - SHORT NOTES
AUTOMATA THEORY - SHORT NOTES
 
Practical Swarm Optimization (PSO)
Practical Swarm Optimization (PSO)Practical Swarm Optimization (PSO)
Practical Swarm Optimization (PSO)
 
Knowledge based agents
Knowledge based agentsKnowledge based agents
Knowledge based agents
 
Pumping lemma for regular language
Pumping lemma for regular languagePumping lemma for regular language
Pumping lemma for regular language
 
Over view of Laplace Transform and its Properties
Over view of Laplace Transform and its Properties Over view of Laplace Transform and its Properties
Over view of Laplace Transform and its Properties
 
Fuzzy sets and operators
Fuzzy sets and operators Fuzzy sets and operators
Fuzzy sets and operators
 

Similar to GNU octave

Similar to GNU octave (20)

sonam Kumari python.ppt
sonam Kumari python.pptsonam Kumari python.ppt
sonam Kumari python.ppt
 
Mbd2
Mbd2Mbd2
Mbd2
 
Lecture1_computer vision-2023.pdf
Lecture1_computer vision-2023.pdfLecture1_computer vision-2023.pdf
Lecture1_computer vision-2023.pdf
 
Introduction to Matlab.pdf
Introduction to Matlab.pdfIntroduction to Matlab.pdf
Introduction to Matlab.pdf
 
python.ppt
python.pptpython.ppt
python.ppt
 
Deep Learning, Scala, and Spark
Deep Learning, Scala, and SparkDeep Learning, Scala, and Spark
Deep Learning, Scala, and Spark
 
Matlab ppt
Matlab pptMatlab ppt
Matlab ppt
 
Matlab ch1 intro
Matlab ch1 introMatlab ch1 intro
Matlab ch1 intro
 
Dsp file
Dsp fileDsp file
Dsp file
 
Matlab1
Matlab1Matlab1
Matlab1
 
MatlabIntro (1).ppt
MatlabIntro (1).pptMatlabIntro (1).ppt
MatlabIntro (1).ppt
 
Programming in R
Programming in RProgramming in R
Programming in R
 
Matlab Introduction
Matlab IntroductionMatlab Introduction
Matlab Introduction
 
Clojure for Data Science
Clojure for Data ScienceClojure for Data Science
Clojure for Data Science
 
Introduction to matlab
Introduction to matlabIntroduction to matlab
Introduction to matlab
 
Mat lab workshop
Mat lab workshopMat lab workshop
Mat lab workshop
 
Kevin merchantss
Kevin merchantssKevin merchantss
Kevin merchantss
 
KEVIN MERCHANT DOCUMENT
KEVIN MERCHANT DOCUMENTKEVIN MERCHANT DOCUMENT
KEVIN MERCHANT DOCUMENT
 
Introduction to matlab
Introduction to matlabIntroduction to matlab
Introduction to matlab
 
python presentation lists,strings,operation
python presentation lists,strings,operationpython presentation lists,strings,operation
python presentation lists,strings,operation
 

Recently uploaded

IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLDeelipZope
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 

Recently uploaded (20)

IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCL
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 

GNU octave

  • 1. CONTENTS  Introduction  History  Issues of matlab users  Technical Details  Some useful OCTAVE commands  Introduction to Matrix  Array , Vector and Matrix  Plotting  Functions  Scripts  Difference between Matlab And Octave
  • 2. INTRODUCTION  High level programming language  Open Source Implementation  Available in Linux and Windows  Distributed in GPL(Gnu Public License)  Designed for matrix computations
  • 3. HISTORY The project was conceived around 1988 . At first it was intended to be a companion to a chemical reactor design course. Real development was started by John W. Eaton in 1992. The first alpha release dates back to January 4, 1993 and on February 17, 1994 version 1.0 was released. Version 4.0.0 was released on May 29, 2015. The latest version 5.1.0 of GNU octave was released on March 1,2019.
  • 4. ISSUES FOR MATLAB USERS Licensing – Octave is free Multi-processor and cluster 64-bit systems and large memory (> 2GB) Lack of GUI support Compatibility/portability issues with other analysis packages (e.g., R) Speed (we need to convert more .m files to C++)
  • 5. TECHNICAL DETAILS  Written in C++ using the C++ standard library.  Uses an interpreter to execute the Octave scripting language.  Octave interpreter has an OpenGL-based graphics engine to create plots, graphs and charts and to save or print them.  Octave includes a Graphical User Interface (GUI) in addition to the traditional Command Line Interface (CLI).
  • 6. SOME USEFUL OCTAVE COMMANDS  who List Known variables  whos List known variables plus their size  help help in finding any command  clear Clear all variables from workspace  clear x y Clear variables x and y from workspace  clc Clear the command windows  ver Display the information of version of OCTAVE  exit quit from OCTAVE session
  • 7. INTRODUCTION TO MATRIX Creating a Matrix Simply type: octave:1> A = [8, 2, 1; 3, -1, 4; 7, 6, -5] Octave will respond with a matrix in pretty-print: A = 8 2 1 3 -1 4 7 6 -5
  • 8. Indexing Always "row before column"! aij = A(i,j) Get an element r = A(i,:) Get a row c = A(:,j) Get a column B = A(i:k,j:l) Get a submatrix Useful indexing command end : octave:1> data = [4 -1 35 9 11 -2]; octave:2> v = data(3:end) ; v = 35 9 11 -2
  • 9. ARRAYS, VECTORS, AND MATRICES Array : A collection of data elements arranged in rows and columns C={1 , 2 , 3; 4 , 5 , 6}; Vector: A one-dimensional array (single row or single column of data elements) Matrix : A two-dimensional array (more than one row and/or column of data elements) >> A=[1;9] >> B=[1;8;3;7] >> C=[1:3; 4:6; 7:9] row or column? column vector C = 1 2 3 4 5 6 7 8 9
  • 10. PLOTTING Plotting in 2D  plot(x,cos(x)) Display x,y-plot Creates automatically a figure window. Octave uses gnu plot to handle graphics.  figure(n) Create figure window 'n' If the figure window already exists, brings it into the foreground (makes it the current figure)  figure Create new figure window with identifier incremented by 1
  • 11. EXAMPLE OF PLOTTING >> x=0:pi/100:2*pi; >> y1=sin(2*x); >> y2=2*cos(2*x); >>plot(x,y1); >> hold on; >> plot(x,y2);
  • 12. FREQUENT COMMANDS ▪ clf Clear figure ▪ hold on Hold axes. Don't replace plot with new plot, superimpose plots ▪ grid on Add grid lines ▪ grid off Remove grid lines ▪ title('Exp1') Set title of figure window ▪ xlabel(‘label name ') Set label of x-axis ▪ ylabel(‘label name') Set label of y-axis ▪ subplot Put several plot axes into figure
  • 13. LINE SPECIFIERS Line Style Specifier Solid(Default) - Dashed -- Dotted . Dash-dot -. Line color Specifier Red r Green g Blue b Cyan c Magenta m Yellow y Black k White w
  • 14. Ex : Find the response to an input of 5u(t). Given that amplitude of step input is 5 . Program: Sys1=tf([1 1 ]*5,[4 4]) Sys2=tf([1]*5,[4 1]) Step(sys,1); Hold on; Step(sys,2)
  • 15. FUNCTIONS Functions and their m-File ▪ When putting a function into its m-file, the name of that file must be the same as the function name plus the .m extension. Examples: calcmoments.m, findfirstpeak.m ▪ To call a function, type its name without the .m extension. Example: [bool i] = findfirstpeak(myreadings, 0.3); ▪ Comments in Octave/Matlab start with % .
  • 16. SCRIPTS Scripts ▪ The second type of m-files is called script. Again, Octave scripts are text files with an .m extension. ▪ Scripts contain executable code. They are basically the "main" programs. ▪ Execute a script by typing its name without the .m extension! Example: octave:1> LocalizeRobot
  • 17. DIFFERENCE BETWEEN MATLAB AND OCTAVE The Basic Comparison between Matlab vs Octave Matlab Octave Definition It is a matrix laboratory, referred to as language used for technical computing. It is programming language used for numerical computing. Programmed It was written in C, C++ and Java programming language. It was written in C, C++ and Fortran Language. Interface It has better interface comparatively. Its interface is not that good as MATLAB is having. RAM It consumes more RAM as compared to Octave. It consumes less RAM than MATLAB. Free It is not free It is free