(Matlab Cookbook II)
This page continues our work with Matlab programming. You can see other
Angle between two Vectors
article shows how to calculate the angle
between vectors, the angle
each vector and axis, and the magnitude of each vector. The vectors are
in three dimensional space...
The first two Fibonacci
numbers are 0 and 1, and each remaining
is the sum of the
previous two. Some sources neglect the initial
instead beginning the sequence with the first two 1s...
We're going to present four variations of a binary-to-decimal conversion
in Matlab; that is, we're going to convert binary
numbers (numbers with only symbols '0' and '1') to decimal numbers...
Two methods for a decimal-to-binary
in Matlab; we're going to
convert decimal numbers
(numbers with 10 different symbols, from '0' to '9', or in base 10)
to Hexadecimal numbers
A major numbering system
used in digital systems is the
hexadecimal system (base 16). Let's see how we can work with 4-bit
to Binary conversion
The following table shows
the meaning of all the symbols in
numbering system and their conversion to binary equivalents...
Octal to Binary conversion
To convert a value from octal
to binary, we first need to know what an octal number is. A
major numerical system,
or base, used in digital elec...
Decimal to Octal
Two methods for a decimal-to-octal
in Matlab; we're going to
convert decimal numbers into octal ones...
Gray Code - to/from Bin or Dec
The Gray code code
was originally designed to prevent undesired
transient states or outputs from electromechanical
is used to facilitate error correction in digital communications...
Excel and Matlab
Interchange of information between these two programs...
Nodal Analysis - find voltages in
Simulation using WinSpice and Matlab
In this article, a Matlab
routine to drive the WinSpice circuit
method can be easily adapted to
simulate and drive any circuit entered in WinSpice. The
performance of the Matlab
driver is illustrated by simulating an amplifier...
routine to drive WinSpice from Matlab
developed now utilizes the inherent capability of
this SPICE simulator to include
other circuit text files
with parameters, and print data
to external .csv (comma separated values) files...
To continue with our Matlab programming ideas, let's explore functions 'fminbnd' and 'fminsearch' to
achieve minimization of functions, which also can be considered a
mathematical optimization for the function...
The problem of how to find
intersections of given lines is
very common in math or basic algebra. The meaning of those
that the given lines...
Another application of the optimization
techniques is the solution of nonlinear systems. We can
express the solution as a minimization problem...
Fitting based on Optimization techniques
In this article we're going to show a practical approach to
solve a curve fitting with Matlab. This explanation is
neither formal nor comprehensive, but straightforward and
work this time with exponential
regression in a curve fitting example. The
following codes find the coefficients of an equation for an exponential
These are some basic
ideas on RGB images
(or image process
in Matlab programming).
These concepts are fundamental and don't require any special toolbox...
experiment explores line
detection (for image
analysis) with this numerical software. No toolbox is