An update on recent technical problems and more from the admin: https://forums.penny-arcade.com/discussion/250292/on-technical-difficulties-mod-coverage-and-other-things/p1?new=1

Options

UkraineTrain
Registered User regular

So, I'm on my second year of my engineering degree and apparently I'm going to need to use MATLAB alot during my third year and quite possibly once I graduate. I spent most of first year thinking of it as pretty much as a calculator, I was pretty surprised to find out its apparently an object oriented programming language.

I know there are quite a few of you out there who are probably already pretty familiar with it and I'm just wondering if you could recommend some books or online tutorials?

I know there are quite a few of you out there who are probably already pretty familiar with it and I'm just wondering if you could recommend some books or online tutorials?

0

## Posts

For online tutorials, I don't know. I've also found google to be a great "reference," though...just punch in what you need to do with a +matlab on the end, and poke through the results. Probably not great for the more programming-oriented stuff, though.

EDIT: Note that the above is very much a "textbook." Homework problems and all. It's pretty comprehensive, though, at least for anything you're likely to be doing anytime soon. I'm making the assumption that none of your future classes require any such textbook...you should probably poke around and see if they do, in which case you can just buy that early and start looking into it.

mcdermottonZackSchillingonWembleyonSeriously, they're incredible. Everything is spelled out in plain English for those new to scripting and programming, no prior experience required.

Edit:For example, from the online documentation:griddata

Data gridding

Syntax

ZI = griddata(x,y,z,XI,YI)

[XI,YI,ZI] = griddata(x,y,z,XI,YI)

[...] = griddata(...,method)

[...] = griddata(...,method,options)

Description

ZI = griddata(x,y,z,XI,YI) fits a surface of the form z = f(x,y) to the data in the (usually) nonuniformly spaced vectors (x,y,z). griddata interpolates this surface at the points specified by (XI,YI) to produce ZI. The surface always passes through the data points. XI and YI usually form a uniform grid (as produced by meshgrid).

XI can be a row vector, in which case it specifies a matrix with constant columns. Similarly, YI can be a column vector, and it specifies a matrix with constant rows.

[XI,YI,ZI] = griddata(x,y,z,XI,YI) returns the interpolated matrix ZI as above, and also returns the matrices XI and YI formed from row vector XI and column vector yi. These latter are the same as the matrices returned by meshgrid.

[...] = griddata(...,method) uses the specified interpolation method:

'linear' Triangle-based linear interpolation (default)'cubic'Triangle-based cubic interpolation'nearest'Nearest neighbor interpolation'v4'MATLAB 4 griddata method

The method defines the type of surface fit to the data. The 'cubic' and 'v4' methods produce smooth surfaces while 'linear' and 'nearest' have discontinuities in the first and zero'th derivatives, respectively. All the methods except 'v4' are based on a Delaunay triangulation of the data. If method is [], then the default 'linear' method is used.

[...] = griddata(...,method,options) specifies a cell array of strings options to be used in Qhull via delaunayn. If options is [], the default delaunayn options are used. If options is {''}, no options are used, not even the default.

Occasionally, griddata might return points on or very near the convex hull of the data as NaNs. This is because roundoff in the computations sometimes makes it difficult to determine if a point near the boundary is in the convex hull.

Remarks

XI and YI can be matrices, in which case griddata returns the values for the corresponding points (XI(i,j),YI(i,j)). Alternatively, you can pass in the row and column vectors xi and yi, respectively. In this case, griddata interprets these vectors as if they were matrices produced by the command meshgrid(xi,yi).

Algorithm

The griddata(...,'v4') command uses the method documented in [3]. The other griddata methods are based on a Delaunay triangulation of the data that uses Qhull [2]. For information about Qhull, see http://www.qhull.org/. For copyright information, see http://www.qhull.org/COPYING.txt.

Examples

Sample a function at 100 random points between Â±2.0:

x, y, and z are now vectors containing nonuniformly sampled data. Define a regular grid, and grid the data to it:

Plot the gridded data along with the nonuniform data points used to generate it:

mesh(XI,YI,ZI),

See Also

delaunay, griddata3, griddatan, interp2, meshgridReferences

[1] Barber, C. B., D.P. Dobkin, and H.T. Huhdanpaa, "The Quickhull Algorithm for Convex Hulls," ACM Transactions on Mathematical Software, Vol. 22, No. 4, Dec. 1996, p. 469-483. Available in PDF format at http://www.acm.org/pubs/citations/journals/toms/1996-22-4/p469-barber.

[2] National Science and Technology Research Center for Computation and Visualization of Geometric Structures (The Geometry Center), University of Minnesota. 1993.

[3] Sandwell, David T., "Biharmonic Spline Interpolation of GEOS-3 and SEASAT Altimeter Data", Geophysical Research Letters, 2, 139-142,1987.

[4] Watson, David E., Contouring: A Guide to the Analysis and Display of Spatial Data, Tarrytown, NY: Pergamon (Elsevier Science, Inc.): 1992.

And almost anything you'll need is documented like that.

VeegeezeeonAs well, ask some professors if there are any resources they would recommend to allow you to get a jump on understanding it if you feel interested.

alcoholic_engineeronjackalonjarekonEven the tutorials on mathworks.com really help beginners. Just getting used to the idea that every variable is inherently a matrix (and understanding the differences between matrices and cells in matlab) helps a lot.

Ballmanon?

I don't know, what? Matlab is mainly for number-crunching and standard analytic techniques, whereas Maple is mainly for symbolic calculations (though lots of people have released Maple packages for more esoteric calculations and analytic techniques).

Marty81onUkraineTrainonI'm going to be using it to create a math model for my biological system representing receptor-ligand interactions of the immune system in the cancer microenvironment.

So, i'm pretty scared. Terrified, actually.

Any advice on Matlab (breakdown of what it is, why used in biological systems, how to visualise it, good tutorials or textbooks for this purpose etc). I have some ideas, but i'd love to know others opinions more experienced than me!

Thanks!

Matlab's not too difficult if you understand the math involved. It's the programming that always gets people. I'm sure if you Google "Matlab beginner tutorials" you can find some really helpful material.