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

alrededor de 10 años hace | 1

| aceptada

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

alrededor de 10 años hace | 1

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

alrededor de 10 años hace | 1

| aceptada

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

alrededor de 10 años hace | 3

| aceptada

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

alrededor de 10 años hace | 0

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

alrededor de 10 años hace | 8

| aceptada

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

alrededor de 10 años hace | 0

| aceptada

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

alrededor de 10 años hace | 1

Pregunta


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

alrededor de 10 años hace | 1 respuesta | 1

1

respuesta

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

alrededor de 10 años hace | 3

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

alrededor de 10 años hace | 1

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

alrededor de 10 años hace | 1

| aceptada

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

alrededor de 10 años hace | 1

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

alrededor de 10 años hace | 1

| aceptada

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

más de 10 años hace | 0

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

más de 10 años hace | 1

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

más de 10 años hace | 1

| aceptada

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

más de 10 años hace | 0

| aceptada

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

más de 10 años hace | 1

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

más de 10 años hace | 1

| aceptada

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

más de 10 años hace | 1

| aceptada

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

más de 10 años hace | 0

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

más de 10 años hace | 0

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

más de 10 años hace | 0

| aceptada

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

más de 10 años hace | 2

| aceptada

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

más de 10 años hace | 0

| aceptada

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

más de 10 años hace | 0

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

más de 10 años hace | 0

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

más de 10 años hace | 0

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

más de 10 años hace | 0

| aceptada

Cargar más