답변 있음
Logical operations on matrix
Assuming I'm understanding your intent, a better way to do this would be with |histc|. No loop necessary: hQ = 12; hQIn...

10년 초과 전 | 1

| 수락됨

답변 있음
Checking if points are contained within a shape
Do you have the Mapping Toolbox? If so, |polyxpoly| may be helpful to calculate exactly where you'll hit the polygon boundary. ...

10년 초과 전 | 1

답변 있음
How can I format the Roh axis in mmpolar.m?
You'll have to manually label the ticks if you prefer a different number format (the same is true for regular axes, although I b...

10년 초과 전 | 1

| 수락됨

답변 있음
Calculating the distance matrix from coordiante matrix
If you have the Stats Toolbox, |pdist|, as already mentioned: A=[3 5 4 5; 1 2 6 3] squareform(pdist(A')) ans = ...

10년 초과 전 | 3

| 수락됨

답변 있음
Legend for plotyy to display the string for data series with yleft axis line and marker one one side, and yright axis line and marker to the right of the string
You can get that effect with <http://www.mathworks.com/matlabcentral/fileexchange/31092-legendflex-m--a-more-flexible--customiza...

10년 초과 전 | 0

답변 있음
Create Own Legend With Colors and Boxes
There are two methods that come to mind... # Use a regular colorbar, and change the tick labels to match your color interval...

10년 초과 전 | 8

| 수락됨

답변 있음
Specific values in colorbar
The unique values in you original question are |[0 1 2 15]|. Do you want just those to appear in the colorbar, or all possible ...

10년 초과 전 | 0

| 수락됨

답변 있음
Splitting Wind direction into four quadrants
As mentioned in those lecture notes, you'll need to use |atan2| instead of |atan| (not |atand| either... your inputs aren't in d...

10년 초과 전 | 1

질문


Access details of dynamically-created web content in Matlab's browser
Is there any way to access the properties of dynamically-created objects (specifically, an SVG canvas created via a D3.js script...

10년 초과 전 | 답변 수: 1 | 1

1

답변

답변 있음
Matlab will only use upper left corner when laptop is disconnect from large display how do I reset plotting to use the entire figure
Unfortunately, no. Matlab only checks for screen size, monitor position, resolution, etc once when it first starts, and all its...

10년 초과 전 | 3

답변 있음
how can i measure mixed layer depth (MLD) using these imported data?
Depends on how you're defining mixed layer depth... a common definition is a difference of 0.125 in potential density from the r...

10년 초과 전 | 1

답변 있음
Changing the current axes causes a line that is a child on another axes to disappear.
I'm moving my comments to a separate thread, since I think the behavior dpb is talking about is a bit more nuanced than your sit...

10년 초과 전 | 1

| 수락됨

답변 있음
How to Limit figure size?
If you're using a recent version of Matlab, you can accomplish this via the |SizeChangedFcn| of the figure: h = figure; ...

10년 초과 전 | 1

답변 있음
Code works in Command Window but not in a script... Find Function
I suggest putting a breakpoint in your code at the line indices_TempMin = find(nbar(:,8) == Cyl_1(1,5)); and run it aga...

10년 초과 전 | 1

| 수락됨

답변 있음
Problems with converting date strings to date numbers
Usually this type of error appears when one of your input datestrings does not match the input format you specified. For exampl...

10년 초과 전 | 0

답변 있음
"Reshaping" matrix
My rule of thumb for this type of problem is to permute and reshape the matrices in such a way that you can access the dimension...

10년 초과 전 | 1

답변 있음
how to draw a line bewteen two points using the exponential distribution?
|expdf| fits a pdf to a distribution of points... it doesn't define the pdf at given x-coordinates. So in your code, you're fit...

10년 초과 전 | 1

| 수락됨

답변 있음
Calculate percentage of similarities in two polygons
If you have the Mapping Toolbox and want a more exact answer: % Some example polygons theta = linspace(0, 2*pi, 100); ...

10년 초과 전 | 0

| 수락됨

답변 있음
logarithmic range colorbar imagesc
You can use my <http://www.mathworks.com/matlabcentral/fileexchange/28943-color-palette-tables---cpt--for-matlab cptcmap.m> func...

10년 초과 전 | 1

답변 있음
Alternate to repmat to create cell array
You can use |deal| to assign a variable to every element of a cell array: structElement = struct('a1','', 'a2', '', 'a3', '...

10년 초과 전 | 1

| 수락됨

답변 있음
readtable with variable names exceeding number of columns
I would recommend reading and parsing the variable names separately. For example: fid = fopen(file, 'r'); str = fgetl(f...

10년 초과 전 | 1

| 수락됨

답변 있음
How do I create a single line plot (just one line) with two differently scaled y-axes?
A second option would be to layer two axes manually. For example: x = rand(100,1); fac = 2.54; ax(1) = axes('box...

10년 초과 전 | 0

답변 있음
Please Help (Not sure on what kind of question this is)
I'm assuming you're missing a 0 in row 2 column 2 of your example output. If so: x = [0 1; 1 0; 1 0]; x = x'; x(x > ...

거의 11년 전 | 0

답변 있음
reshaping data so that I can take sum of every 3 columns
When you say you have a dataset, do you mean a dataset array? I'm assuming so for the moment: Your data: tmp = {... ...

거의 11년 전 | 0

| 수락됨

답변 있음
How can I change multiple fields in a nested structure?
You should be able to do this via |set|: set(h(n).Children.Children(1:2), 'Color', [1 0 0]);

거의 11년 전 | 2

| 수락됨

답변 있음
Legend in for loop
Save the handles of your plotted lines, then pass the specific handles of lines with a unique class to the |legend| command: ...

거의 11년 전 | 0

| 수락됨

답변 있음
how do I remove lines that show up in contour plots?
I'm guessing these are antialiasing artifacts, as discussed in <http://www.mathworks.com/matlabcentral/newsreader/view_thread/28...

거의 11년 전 | 0

답변 있음
How to impliment faster logical indexing?
I often use |interp1| with nearest-neighbor interpolation as a way of matching up not-exactly-matching values in one matrix with...

거의 11년 전 | 0

답변 있음
Prevent Mac from Falling Asleep While Running MATLAB Code
I've never used |caffeinate|, so I'm not entirely sure how the command works (though it looks like a good one to know, so thanks...

거의 11년 전 | 0

답변 있음
How can I plot two 2D figures simultaneously, with one orthogonal to the other? They both share the same t axis, but the x axis lies perpendicular to the z axis and t axis, and they all share the same zero point.
Do you mean you want a 3D axis? t = 0:.1:20; x = 2*(18./(.5*t+.5).^.5 - 5.5); z = 18./(.5*t+.5).^.5 - 5.5; ...

거의 11년 전 | 0

| 수락됨

더 보기