Explore BrainMass


Initially developed by Cleve Moler of the University of New Mexico to allow his students access to linear algebra and eigenvector/value software libraries without having to learn FORTRAN. Since then, it has enjoyed widespread use in the applied science industry and academia, particularly in professions that deal majorly in image processing, thanks to its huge focus on numerical operations and graphing. It passed the 1 million users mark in early 20041.The name 'MATLAB' is a portmanteau of 'matrix laboratory'. It is currently developed and maintained by Mathworks who helped commercialize Moler's creation and rewrote it in C.

Sample 3D plot done using MATLAB by Dr. J. Rodal

Some of the tasks MATLAB succeeds most in are: matrix manipulations, plotting of functions, data implementation of algorithms and creating user interfaces. It is also highly adaptable due to its ability to interface with programs written in other languages including C, C++, Java and FORTRAN. In addition, despite its primary use as a numerical computing environment, there is an optional toolbox available which uses the MuPAD symbolic engine to supply this fourth-generation programming language with symbolic computing capabilities as well. MATLAB is most commonly accessed simply by typing MATLAB commands into the command window or executing files containing MATLAB code, with support for both scripts and functions.

In MATLAB, variables are defined using a single equals for assignment, as in many languages. Its typing system is both dynamic, as variables can be assigned without type declaration, and weak, as types are implicitly converted. As new releases came, MATLAB now supports object-orientated programming as well, though its class system is a little different and centers around 'value' and 'reference' classes.



1. Richard Goering, "Matlab edges closer to electronic design automation world," EE Times, 10/04/2004

Matlab: Naive Gaussian Elimination and L-U Decomposition

Please find the question attached to the document below. function [x] = gaussel(A,b) % [x] = gaussel(A,b) % % This subroutine will perform Gaussian elimination % and back substitution to solve the system Ax = b. % INPUT : A - matrix for the left hand side. % b - vector for the right hand side % % OUTPUT : x -

Runge-Kutta, Lorenz Attractor, Butterfly Effect

In 1963 Edward Lorenz derived a simple set of equations describing convection in the atmosphere: (see attached file for equations). Even though these equations are simple and deterministic, long-term behavior of solutions for some particular values of parameters (e.g. omega = 10, ro = 28, beta = 8/3) could be highly unpred

Describing Convection in the Atomsphere

In 1963 Edward Lorenz derived a simple set of equations describing convection in the atmosphere: See attached for equations. 1. Please implement Euler integration scheme for (1) with integration step delta = 0.0001 2. Please implement improved Euler integration scheme for (1) with delta = 0.0001 3. Please implement Runge

Sparse Matrices, Two-Dimensional Matrices and Lists

One of the problems of storing data in a matrix (a two-dimensional Cartesian structure) is that if not all of the elements are used, there might be quite a waste of space. In order to handle this, we can use a construct called a "sparse matrix", where only the active elements appear. Each such element is accompanied by its two i

MATLAB (Must be scripted in MATLAB)

I need a detailed script in order to show this works in MATLAB. On this page the only problem I need it #26 (the circled problem with the Taylor expansion). Thank-you for your excellent help.

MATLAB (must be coded for MATLAB)

I need a detailed script in order to show this works in MATLAB. ----> Kernighan and Ritchie, who created the C language, advise that, "The first program to write in any language is the same for all languages: Print the words "hello, world". This is the basic hurdle; to leap over it you have to be able to create program tex


Simple matlab questions need solved, given step by step answers as how the code flows, works, etc to get the answers. 1) Which is the correct matlab logical expression to check whether the value of x is between -10 and 10 (inclusive)? a) -10 <= x <=10 b) -10<= x, X <= 10 c) x>=-10 & X<=10 d) x>=-10| x<=10 e) none 10


The program runs, then stops and gives an error of double going into the switch. I changed the code to make it output the sounds, but my whole reasoning was to make this version work with the row vectors. %taking input phone numbers Horvector=[1209 1336 1477]; Vervector=[697, 770, 852, 941]; x=input('Enter Phone Numbe

Matlab- Hemoglobin spectroscopy.

Hemoglobin spectroscopy. There are three files to be used for this problem: oxy.asc gives the &#956;a spectrum of 100% oxyhemoglobin for tissue with 0.5% blood content by volume and 150 mg of hemoglobin per mL of blood (first column is wavelength in nm, second column is &#956;a in cm-1), deoxy.asc gives the same for 100% deo

MATLAB program loop

Please type something up step by step how this program work, maybe some pictures if possible showing how the code changes. The comments are good, but does not explain how the code really works....Like you type project5.wav on command window, it is assigned to filename, then the next line ... pictures or a number table or somet

Matlab Program Revisions

Here is the program I tweaked, but I seriously need you to comment every line including and below this code piece (index=round(x*fs); ) what each line does and how it works. The more explanation the better. I do not understand how the index works, everything. I need step by step how all the numbers flow so to say from variabl

Matlab program help

Problem statement: 1)Prompt a user to enter a .wav filename where the DTMF tones are stored. Load the recorded tones. Use the .wav file provided called project5.wav. (NOTE: this file is on my computer and is not presented.), but the file contains simulated tones for the numbers 24680 which where generated using a previous

Matlab Program

In Matlab Develop a program that will: a. Calculate the integral of a n-order polynomial using Simpson's rule and rectangle rule, the orders will be positive integers. b. The user shall input the coefficients to the polynomial c. The user shall be able to define the order of the polynomial d. The user will define how many s

Use matlab ode45 to integrate a system of differential equations

Use of ode45 to complete this...however, I am not sure how to go about it. 1.) integrate set of diff. equations with given initial conditions and constants and plot concentration profiles of all 5 dependent variables 2.) plot phase plot of s1 vs s2. What does the phase plot demonstrate? ...I don't know? 3.) perform a stabi

Matlab trapezoid quadrature

(See attached file for full problem description) --- The following was measured for the time response of the Minute Ventilation (in liters/minute) for placebo, intravenous morphine, and intrathecal morphine treatments. Hours Placebo Intravenous Intrathecal 0 38 34 30 1 35 19 23.5 2 42 16 20 4 35.5 16 13.5 6 35 17 10

Matlab normal equations without polyfit

See attached file for full problem description. Does anyone know how to do this without using Matlab functions such as polyfit and etc? The regression and error analysis needs to be performed by solving the normal equations. I also attached an example of how it is supposed to be modeled. --- %Tossing a lead weight: examp

Matlab script for statistics and histogram

(See attached file for full problem description) Any help is greatly appreciated, as the script I wrote does not seem to be deciphering between the two sets of data. --- Write a Matlab script using the "randn" command to generate a vector of 10,000 random numbers that are normally distributed around zero, with a variance

MATLAB polyfit find P50 in mmHg

How do I convert back to find P50 in mmHg and n given the best-fit? function po2() %This function tests the linearty of tetrameric bovine hemoglobin binding %to oxygen as a possible blood substitute for monomeric hemoglobin. An %oxygen dissociation curve is created, and a linear regression is performed %on the experime

Model used to analyze body's response to a bolus injection of this antibiotic

This model is used to analyze the body's response to a bolus injection of this antibiotic: B(t) = B0e(-k*t) Using this model, and data provided for the average plasma concentration data in ug/ml with time in hours : a) perform linear regression on this penicillin clearance using the normal equations b) plot the concentration

Matlab function polyfit

Not quite sure how to use polyfit to write the matlab program. (See attached file for full problem description) --- pO2 10 20 30 40 50 60 70 80 90 100 110 120 Y 0.18 0.4 0.65 0.8 0.87 0.92 0.94 0.95 0.95 0.96 0.96 0.97 Where pO2 is given in units of mmHg. Data collected for tetrameric bovine hemoglobin binding to ox

MATLAB "break" function

(See attached file for full problem description) --- How would you rewrite the following script without using break? for p = 7:8 for q = 3:5 for r = 1:2 fprintf(' %3.0f, %3.0f, %3.0fn' , p, q, r) end if q = = 4, break; end end end ---

Convert structure to matlab m-file

Convert the following structure plan into a function m-file with two inputs (M and N): Get M and N values if M does not equal round(M) Give error message that inputs must be integers end if if N does not equal round(N) Give error message that inputs must be integers end if while remainder of M divided by N is not

MATLAB Convolution Simulation

Write and verify a computer program to perform the convolution of two discrete signals. [1] The convolution program should be written as an m-file able to handle two general discrete signals. The M-file will be ain function file format, it will take two inputs sin1, sin2, and return an output sout. sin1, sin2: can be ro

Matlab plotting cosh and sinh on a single plot using a script file

I have no idea what I'm doing. I got help writing a Matlab program that plots the cosh(3x-(pi/2)) and sinh(5x+(pi/8)) on a single plot from x=-5 to 25 using a script file. But could you please explain to me what each line of this script file represents/does and how I actually get the graph to come up in Matlab? I especially don'