Respondida
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, ...

más de 11 años hace | 1

| aceptada

Respondida
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, ...

más de 11 años hace | 0

| aceptada

Respondida
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...

más de 11 años hace | 0

| aceptada

Enviada


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

más de 11 años hace | 3 descargas |

4.2 / 5
Thumbnail

Enviada


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

más de 11 años hace | 2 descargas |

4.7 / 5

Respondida
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 ...

más de 11 años hace | 2

Respondida
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...

más de 11 años hace | 1

Respondida
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...

más de 11 años hace | 1

| aceptada

Respondida
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...

más de 11 años hace | 3

Respondida
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, '...

más de 11 años hace | 3

Respondida
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...

más de 11 años hace | 2

| aceptada

Respondida
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...

más de 11 años hace | 0

| aceptada

Respondida
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...

más de 11 años hace | 0

Respondida
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)...

más de 11 años hace | 1

Respondida
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...

más de 11 años hace | 0

Respondida
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;

más de 11 años hace | 1

| aceptada

Respondida
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...

más de 11 años hace | 0

Respondida
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

más de 11 años hace | 1

| aceptada

Respondida
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...

más de 11 años hace | 0

Respondida
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...

más de 11 años hace | 0

Respondida
Throwing out bad data
You don't need to loop: x = x(count == 10,:);

más de 11 años hace | 0

| aceptada

Respondida
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...

más de 11 años hace | 0

| aceptada

Respondida
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)...

más de 11 años hace | 1

Pregunta


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...

más de 11 años hace | 0 respuestas | 1

0

respuestas

Respondida
How can I view an undistorted JPG file in MATLAB?
image(img); axis equal;

más de 11 años hace | 0

| aceptada

Respondida
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...

más de 11 años hace | 0

| aceptada

Respondida
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...

más de 11 años hace | 1

Respondida
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...

más de 11 años hace | 1

| aceptada

Respondida
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...

más de 11 años hace | 0

| aceptada

Respondida
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 ...

más de 11 años hace | 2

Cargar más