Answered
using matlab applying runge-kutta method
The Mathworks offers fixed-step solvers <http://www.mathworks.com/support/tech-notes/1500/1510.html#fixed| here>.

14 years ago | 0

| accepted

Answered
How to use m_pcolor and/or pcolorm
Looks like you reversed your latitude and longitude, which would place your grid outside the Gulf Coast frame. Try m_pcolor...

14 years ago | 0

Answered
What is your MATLAB uptime
If my work computer is on, then Matlab is usually running; I'll usually keep a single session open for a week or so. And usuall...

14 years ago | 0

Answered
plot different color
Another way of doing this would be to use a patch object instead of a line; that way you can get a color-change effect with only...

14 years ago | 1

| accepted

Answered
pcolor
Alternatively pcolor(X,Y,Z); shading flat;

14 years ago | 1

Answered
Unequal tick distribution on axis
Do you really want to plot all your data with such an odd x coordinate system? I would recommend translating your x coordinates...

14 years ago | 0

Answered
Unable to get all the points graphed.
The plot command clears an axis unless you issue a hold on command. In your case, though, the loop is unnecessary: ...

14 years ago | 0

Answered
Help in visualizing four-dimensional data.
Perhaps the slice function could help?

14 years ago | 0

Answered
Function similar to MS Excel "subtotal"?
If your grouping variable includes only integers, then x = [... 1 23 1 29 1 43 2 38 2 22]; subtot = accumarray(x(:,1), x(:...

14 years ago | 0

Answered
How to load a file
Textscan is probably your best bet here, assuming you want an n x 2 array of the paired data points. Try: fid = fopen('fil...

15 years ago | 0

Answered
Changes in STRNCMP
On the topic of history, I've requested this as an enhancement multiple times. When I wrote to the Mathworks to ask whether I c...

15 years ago | 2

Answered
spline? interp?
You can try interpolating both x and y parametrically. This example puts an equal number of new points between each of your old...

15 years ago | 1

Answered
Graphing
Try <http://www.mathworks.com/matlabcentral/fileexchange/31092-legendflex-a-more-flexible-legend| legendflex>

15 years ago | 0

| accepted

Answered
To draw a curve line
Are you looking for a simple interpolation? Your data... x = [0 0 0 0 0]; y = [-1844 -952 0 952 1844]; z = [2000 1446 ...

15 years ago | 0

| accepted

Answered
Plotting spheres color according to a given value
Look more closely at the surf command; it accepts a fourth input to define the color of the surface, and only falls back on the ...

15 years ago | 3

| accepted

Answered
Reading Excel files on a Mac
Since I was unable to find a way to get Matlab to read these older files, and was unwilling to manually save all the worksheets ...

15 years ago | 1

Answered
Masking interpolation outside the boundaries of an overlay
You'd be more likely to get responses to your questions if you post code that can actually be run (yours includes several functi...

15 years ago | 3

| accepted

Answered
Where do people learn "bad" programming habits (i.e., goto, global, and eval)
In my field, at least, bad habits are passed from one generation to the next, since most people learn to code not through classe...

15 years ago | 2

Question


Reading Excel files on a Mac
Trying to read some data from Excel files into Matlab, but my files seem to be causing quite a few problems. I'm working on a M...

15 years ago | 3 answers | 0

3

answers

Answered
Further question about using pcolor
How is your data distributed, geographically? Is it located on a grid? If so, you just need to rearrange the data into the app...

15 years ago | 0

| accepted

Answered
Merge confusion matrices in nice, vectorized way.
You might want to add a loop over the columns if your matrices will be varying sizes, but otherwise... Your data: m{1}...

15 years ago | 0

Answered
problems calling matlab from command line in OS X
The /usr/bin/matlab file should be a symbolic link; do an ls -l to see where it's pointing (should point to <matlabroot >/bin/ma...

15 years ago | 0

Answered
Question about if - else and ploting
Use logical indexing to get a vector of Beaufort numbers. Right now you're only generating a singe value; when a vector is pass...

15 years ago | 0

Answered
Matlab slowing down while reading netCDF
What version of Matlab are you running? I don't have a clear answer for you, but I experienced some rather dramatic slowdown of...

15 years ago | 0

Answered
Contour Plot Problem...X-axis is defined by equation.
Two things... 1) You need to replace beta with B in your theta definition, or you'll encounter matrix dimension clashes 2...

15 years ago | 0

| accepted

Answered
Selectively removing null data from matrices
If this is just for plotting purposes, replacing the trailing 0s with NaNs will serve If 0 is never a valid output, then ...

15 years ago | 0

| accepted

Answered
Contours and shapefiles
Not quite sure whether your trying to contain individual points, or the contour lines themselves, and whether you're trying to m...

15 years ago | 0

Answered
Remove common factor from axis
Change the renderer from OpenGL to zbuffer. set(gcf, 'renderer', 'zbuffer'); Why this fixes the problem, I really have no ide...

15 years ago | 2

Answered
Creating legend based on numeric array
One more: legendCell = cellstr(num2str(N', 'N=%-d'))

15 years ago | 34

| accepted

Answered
conversion of seconds to date
Your code looks like it should work. Have you verified that your data uses actual dates, with leap years, as opposed to a 365-d...

15 years ago | 1

Load more