Top "Matlab" questions

MATLAB is a high-level language and interactive programming environment for numerical computation and visualization developed by MathWorks.

In MATLAB, can I have a script and a function definition in the same file?

Suppose I have a function f() and I want to use it in my_file.m, which is a script. …

file matlab function
How to draw a surface plot without black edges in MATLAB?

The black lines are awful, how can I get rid of them? I want only the colored surfaces.

matlab plot graph
How can I set subplot size in MATLAB figure?

I often need to plot 10 images together, but using this code results in small images : img = rand(400,600); for i=1:10 subplot(2,5,…

matlab plot screen fullscreen figure
How to draw a line on an image in matlab?

I have two points lets say: P(x,y) [point lies at the top of image] P'(x',y') [point …

matlab line draw
How do I visualize a matrix with colors and values displayed?

I want to create images like this from a double precision matrix using MATLAB. Sample image: http://twitpic.com/2xs943

matlab matrix data-visualization
How do I compare all elements of two arrays?

I have two big arrays with about 1000 rows and 1000 columns. I need to compare each element of these arrays and …

matlab comparison matrix vectorization
How do I access structure fields dynamically?

I have a structure with many fields which are vectors of different lengths. I would like to access the fields …

matlab matlab-struct
Add a row to a matrix

I have a matrix A like 1 2 3 4 5 6 7 8 9 0 and I want to expand it with a row of ones to get 1 1 1 1 1 1 2 3 4 5 6 7 8 9 0 I …

matlab matrix concatenation row addition
What causes an invalid file identifier in MATLAB?

I have a MATLAB script that I could have sworn worked fine the last time I used it (a year …

matlab fopen
Line of best fit scatter plot

I'm trying to do a scatter plot with a line of best fit in matlab, I can get a scatter …

matlab linear-regression scatter-plot