Réponse apportée
How do I find if a x,y point is within a given polygon?
The |inpolygon| function is included in base Matlab. If your polygons cover a small geographic area and don't cross the poles, ...

plus de 11 ans il y a | 1

| A accepté

Réponse apportée
Selecting elements of logically pruned vector (concatenating indices)
I think you'd need to save the indices. idx = find(v_log); c = b(idx(ind)); Depending on the size/sparsity of v_log, ...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
getframe difference in 2014b.... bug?
I'll also confirm, but older versions of Matlab also responded to |axis image| without changing the axis's Position property, so...

plus de 11 ans il y a | 0

| A accepté

A soumis


tick2text: create easy-to-customize tick labels
Customized tick marks, maintained on zoom and pan

plus de 11 ans il y a | 1 téléchargement |

4.2 / 5
Thumbnail

A soumis


subdir: a recursive file search
Performs a recursive file search using same input and output format as dir function

plus de 11 ans il y a | 4 téléchargements |

4.7 / 5

Réponse apportée
How to do workaround MATLAB crash in set(gcf,'CurrentAxes',ax1)?
I'm not sure if it's entirely related, but I have also found the need to throw a lot of |drawnow| commands into some of my code ...

plus de 11 ans il y a | 2

Réponse apportée
How to print using fprintf to distinguisish 1.1 from 1.10 and 1.100
I would just do a simple concatenation, rather than try to figure out the proper |%f| precision for each: [r,c] = meshgri...

plus de 11 ans il y a | 1

Réponse apportée
How to get the points of [lat, lon] of a full great circle?
I would use a combination of |azimuth|, |gc2sc|, and |scircle1|: az = azimuth(lat1, lon1, lat2, lon2) [lat, lon, r] = gc...

plus de 11 ans il y a | 1

| A accepté

Réponse apportée
Using time derivative dot in plot legend
You just need to set the interpreter after plotting: plot(rand(10,1)); hl = legend('$\dot{\theta}_{in}$'); set(hl, 'I...

plus de 11 ans il y a | 3

Réponse apportée
How to enlarge legend marker size in r2014b?
The marker handles are still there... load seamount; hs = scatter(x,y,5,z); [hleg, hobj, hout, mout] = legend(hs, '...

plus de 11 ans il y a | 3

Réponse apportée
How to generate string without space at the beginning?
Easier, you can just add the string part to the |num2str| format: Fields = num2str((2:2:16)', 'Item_%d'); Of course, thi...

plus de 11 ans il y a | 2

| A accepté

Réponse apportée
Arrange data in cell array for complete data years
I'm not sure I see the link between your two sample files... the date/value pairs in output.csv doesn't seem to match those in t...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
Reading in Legend, then displaying, gives different string order - Matlab 2014b
Nothing immediately jumps out at me as incorrect. Does the loaded figure and the new subplot include the same number of child o...

plus de 11 ans il y a | 0

Réponse apportée
overwriting certain lines in a matrix with previous lines that satisfy a condition.
marked = [3,6,7,14,15,16,17]; good = setdiff(1:20, marked); prev = arrayfun(@(x) good(find(good < x,1,'last')), marked)...

plus de 11 ans il y a | 1

Réponse apportée
How to use accumarray?
A small variation in Guillaume's suggestion, in case you want a value for every day/hour/hour of day (even if no data was collec...

plus de 11 ans il y a | 0

Réponse apportée
substituting value in matrix does not work for some reason
You can't use |==| with NaNs: >> NaN == NaN ans = 0 Use |isnan| instead: B(isnan(A)) = NaN;

plus de 11 ans il y a | 1

| A accepté

Réponse apportée
Patch performance with caxis?
It might help if you can consolidate your multiple patch objects into one many-faced patch. I've found that this usually speeds...

plus de 11 ans il y a | 0

Réponse apportée
using colormap to assign one color for values => 0 and one for < 0
colormap([0 0 1; 1 0 0]); set(gca, 'clim', [-1 1]); % or any centered-on-0 limits

plus de 11 ans il y a | 1

| A accepté

Réponse apportée
Conflict with 2 matlab R2014b windows running
That folder includes some of the core Matlab functionality; why are you trying to remove it? It's definitely not an external to...

plus de 11 ans il y a | 0

Réponse apportée
imwrite from polar surf
If your polar plot already appears as you need it to, it might be easiest to simply steal the data from the plot rather than cal...

plus de 11 ans il y a | 0

Réponse apportée
Throwing out bad data
You don't need to loop: x = x(count == 10,:);

presque 12 ans il y a | 0

| A accepté

Réponse apportée
constrain surf() plot region
I would recommend setting up your grid in polar coordinates. The |surf| command (along with |mesh|, |pcolor|, etc.) doesn't req...

presque 12 ans il y a | 0

| A accepté

Réponse apportée
Syntax other than evil eval to build dynamic dataset?
It's not ideal (since it can confuse the interpreter), but I've occasionally used load/save to accomplish this. Tmp.(incexp)...

presque 12 ans il y a | 1

Question


Using git to share Matlab code
This is perhaps more of a git question than a Matlab one, but since Git is now being integrated into Matlab a bit I thought othe...

presque 12 ans il y a | 1 réponse | 1

0

réponse

Réponse apportée
How can I view an undistorted JPG file in MATLAB?
image(img); axis equal;

presque 12 ans il y a | 0

| A accepté

Réponse apportée
I'm asked to find the probability of this problem :(
A few things... - You're not changing anything within your loop. You probably want to be changing the values of a,b,c,d, and...

presque 12 ans il y a | 0

| A accepté

Réponse apportée
reading undelimited comma numbers
Trying to convert to an Excel format seems unnecessary and complicated... if you're planning to work with this data in Matlab on...

presque 12 ans il y a | 1

Réponse apportée
Help with Tick mark labels
The syntax you're using there will only work in the latest release of Matlab (R2014b). In earlier versions, the graphics handle...

presque 12 ans il y a | 1

| A accepté

Réponse apportée
ncwrite issue + loop through many netcdf files
When you create a new variable in the file, you'll probably need to specify the dimensions for the new variable. For example, t...

presque 12 ans il y a | 0

| A accepté

Réponse apportée
Is it possible to calculate the line of sight between two points in a 2d polygon?
Have you tried taking advantage of the fact that |polyxpoly| can process NaN-separated polylines? It seems to handle 1000 line ...

presque 12 ans il y a | 2

Charger plus