Respondida
How to index a matrix using the ITERATION values of a valArray with non-consecutive numbers?
There are two ways you could do this. One is to use an index value corresponding to the length of your |s| values: s = [12...

más de 7 años hace | 0

| aceptada

Respondida
Finding corresponding x value for second graph
Best guess, seeing that I can't see what your myode45function returns... It looks like your |y| matrix has at least 2 columns. ...

más de 7 años hace | 0

Respondida
Find unique in matrix of x,y coordinates
To find unique rows, you can use |unique| with the |'rows'| option. (The |'stable'| option preserves the input order, if that's...

más de 7 años hace | 1

| aceptada

Respondida
I'm trying to sort one vector based on another vector of seemingly the same size, but i keep getting the index exceeds matrix dimensions error. What's the issue?
I'm pretty sure there a couple things in here that aren't working like you'd like them to. First, in you capital function, t...

más de 7 años hace | 0

Respondida
Lines of longitude. How to merge points?
Assuming this is a first step in mapping something a bit more complicated, I'd suggest using an existing mapping toolbox rather ...

más de 7 años hace | 1

| aceptada

Respondida
search through an array for patterns and put into cell arrays.
This sort of problem can usually be solved by using a various combinations of |diff|: A = [ 1 2 3 78 28 92 1 76 89 90 23 87...

más de 7 años hace | 1

| aceptada

Respondida
Using Worldmap function to develop maps
When you say "shape of the map", do you mean you want higher resolution coastlines? If so, there are many places to download hi...

más de 7 años hace | 1

Respondida
Kriging codes in matlab
Walter's answer links to the best toolbox that I know of for kriging in Matlab. However, if you really want to use the gstat me...

más de 7 años hace | 2

| aceptada

Respondida
How to create array of linearly spaced values from starting and ending points
This method is faster than looping over linspace: x = linspace(0,1,nPoints); A2 = go + x.*(st - go); Here's a timing ...

más de 7 años hace | 7

| aceptada

Respondida
How to make pcolor plot from three vector
You can calculate the bin averages pretty quickly using |discretize| and |accumarray|: Some sample data: npt = 10000; ...

más de 7 años hace | 1

| aceptada

Respondida
How to take an average over one month during different years ?
A bit hard to tell from your screenshot whether your time array is an array of datetimes or an array of date strings. Assuming ...

más de 7 años hace | 0

| aceptada

Respondida
Function to read a 16bit color composite image to matlab
Many years ago, I had to work with some 16-bit color avi files. Those files stored the RGB color data using 16 bits per pixel: 5...

casi 8 años hace | 0

Respondida
Plotting vectors with different lengths due to missing values
Can you give a small sample of your data? Is it manually entered in a script, or are you reading it in from a file? In gener...

casi 8 años hace | 1

Respondida
For loop: max iterations exceeded
That message typically comes from optimization routines, and it indicates that it wasn't able to meet the optimization criteria ...

casi 8 años hace | 1

Respondida
Why my code doesn't work?
I haven't given any thought to the algorithm you show, though a quick test does seem to indicate it converges to cosh for small ...

casi 8 años hace | 1

Respondida
How can I speed up these for loops?
You're calling |interp2| 800 times with a single point each. Just moving that outside the loop should be able to speed things u...

casi 8 años hace | 0

| aceptada

Respondida
Change default behavior of cellfun to 'UniformOuput' = false
I really wish this was an option too! I use cellfun all the time, and almost always with cell outputs required. This is one of...

casi 8 años hace | 1

| aceptada

Respondida
Generating 50 Random locations inside geo map data
Do you want the points to be specifically located in the named land mass? Or anywhere on land within the designated map limits?...

casi 8 años hace | 0

Respondida
How can I take the cosine argument with regexp
Perhaps I'm misunderstanding what you're looking for, but does the following match the pattern you want? str = 'cos(-2/3*pi...

casi 8 años hace | 0

| aceptada

Respondida
Trying to plot a point on m_map but it does not appear.
Like |plot|, the default marker for |m_plot| is none... good for plotting lines, but not single points. Add a marker and you sh...

casi 8 años hace | 0

Respondida
Mapping Toolbox: Eigenvector specifies Color of shape file
The easiest way to do this with complex polygons (multi-face polygons or polygons with holes, as is often the case with borders)...

casi 8 años hace | 3

| aceptada

Respondida
How do I get a "tabular" legend?
You can hack your way to a solution with my <https://www.mathworks.com/matlabcentral/fileexchange/31092-legendflex-m--a-more-fle...

casi 8 años hace | 3

| aceptada

Respondida
Freqz plotting warning when use latex as default interpreter
The Latex interpreter assumes text is written in Latex text mode, and requires typical Latex markup ($ or $$) to switch the stri...

alrededor de 8 años hace | 2

Respondida
Finding normals to contours on contour plot
Take a look at the various streamline functions ( |stream2|, |streamline|, etc). Depending on your surface, you may need to do ...

alrededor de 8 años hace | 4

| aceptada

Respondida
plot multiple time plots
What version of Matlab are you running? Zooming and panning with a time axis is much easier with datetimes than datenumbers, bu...

alrededor de 8 años hace | 0

| aceptada

Respondida
Merging Table with Duplicate Dates
The |accumarray| function is designed for this sort of problem: % Your data data = {... 736561 'USA' 2752 251 7...

alrededor de 8 años hace | 2

| aceptada

Respondida
HOW TO UPDATE NEWREADER FILES ?
I'll confirm that I'm seeing the same thing when viewing the newsreader through the MatlabCentral viewer. I assume this is a pr...

alrededor de 8 años hace | 0

Respondida
Setting a title for a legend
As a workaround, <https://www.mathworks.com/matlabcentral/fileexchange/31092-legendflex-m--a-more-flexible--customizable-legend ...

alrededor de 8 años hace | 6

Respondida
Plotting image over map
You'll need to georeference the image. You might be able to do this automatically on import if the image already has that info ...

alrededor de 8 años hace | 1

Respondida
How do I take average of specific portions of data with overlap?
First comment: don't store values in variables with numbered names like that. It just makes a mess, and that's why arrays were ...

más de 8 años hace | 2

| aceptada

Cargar más