답변 있음
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, ...

11년 초과 전 | 1

| 수락됨

답변 있음
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, ...

11년 초과 전 | 0

| 수락됨

답변 있음
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...

11년 초과 전 | 0

| 수락됨

제출됨


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

11년 초과 전 | 다운로드 수: 1 |

4.2 / 5
Thumbnail

제출됨


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

11년 초과 전 | 다운로드 수: 4 |

4.7 / 5

답변 있음
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 ...

11년 초과 전 | 2

답변 있음
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...

11년 초과 전 | 1

답변 있음
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...

11년 초과 전 | 1

| 수락됨

답변 있음
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...

11년 초과 전 | 3

답변 있음
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, '...

11년 초과 전 | 3

답변 있음
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...

11년 초과 전 | 2

| 수락됨

답변 있음
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...

11년 초과 전 | 0

| 수락됨

답변 있음
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...

11년 초과 전 | 0

답변 있음
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)...

11년 초과 전 | 1

답변 있음
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...

11년 초과 전 | 0

답변 있음
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;

11년 초과 전 | 1

| 수락됨

답변 있음
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...

11년 초과 전 | 0

답변 있음
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

11년 초과 전 | 1

| 수락됨

답변 있음
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...

11년 초과 전 | 0

답변 있음
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...

11년 초과 전 | 0

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

11년 초과 전 | 0

| 수락됨

답변 있음
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...

11년 초과 전 | 0

| 수락됨

답변 있음
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)...

11년 초과 전 | 1

질문


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

11년 초과 전 | 답변 수: 0 | 1

0

답변

답변 있음
How can I view an undistorted JPG file in MATLAB?
image(img); axis equal;

11년 초과 전 | 0

| 수락됨

답변 있음
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...

11년 초과 전 | 0

| 수락됨

답변 있음
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...

11년 초과 전 | 1

답변 있음
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...

거의 12년 전 | 1

| 수락됨

답변 있음
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...

거의 12년 전 | 0

| 수락됨

답변 있음
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 ...

거의 12년 전 | 2

더 보기