Respondida
How do I deidentify geoplot data?
You can turn off the Tick marks with the TickDir property on the GeographicAxes: geoplot(42+rand(10,1), -71+rand(10,1)) ax=gca...

más de 2 años hace | 1

Respondida
How to bin polar coordinates
The way you've written the code, the number of outputs in yBinned depends on how many of the bins of X were populated. edges = ...

más de 2 años hace | 1

Respondida
Using readtable to import a 5x1 column from Excel is missing one element. Why??
readtable detected the first value as a variable name Just add 'ReadVariableNames', false to your call to readtable (if you don...

más de 2 años hace | 0

| aceptada

Respondida
How can I add x and y ticks to my imagesc graph?
When you use image (or imagesc), the values in the matrix are distributed evenly. Changing the ticks just changes what's labels....

más de 2 años hace | 0

| aceptada

Respondida
Create closed curve from intersection between multiple curves
polyshape is pretty good for this, but you need to give it polygons not curves (i.e. define what's inside and what's outside). N...

más de 2 años hace | 2

| aceptada

Respondida
Conditionally replace numerical Array with Strings
This is happening because old_array is an array of doubles, you can't have a mix of strings and doubles in a regular (i.e. not c...

más de 2 años hace | 0

Respondida
cut of zeros from a matrix based on the longest non-zero row
Another way to phrase this question is to say you want to remove columns from the right side of the matrix if the whole column i...

más de 2 años hace | 0

| aceptada

Respondida
RGB to Grayscale without using rgb2gray
You can choose many approaches for converting to grayscale. For instance you could weight the three colors equally: im=imread('...

más de 2 años hace | 0

Respondida
Use of 2D colormaps possible in Matlab?
There's nothing (that I know of) that provides this as a built-in utility in MATLAB, but it's pretty easy to do this kind of thi...

más de 2 años hace | 0

| aceptada

Respondida
How to find correlations of corresponding rows of two arrays?
The correlations of columns are the diagonal of the correlation matrix, so you can Transpose your matrices on the way in to co...

más de 2 años hace | 0

| aceptada

Respondida
How to add 3 x-axies onto a double subplot?
You can sort of fake this kind of thing with TiledChartLayout. The layout will keep your axes lined up. Starting simple, with...

más de 2 años hace | 0

| aceptada

Respondida
Quiver plot appears upside down.
Images are normally shown in what's called ij coordinates, meaning (in the all positive number case) the top left corner is 0,0,...

más de 2 años hace | 0

| aceptada

Respondida
y-axis are still inverted despite using fftshift
Your code doesn't run and you didn't include an image, but in general, when you call imagesc it will plot in ij coordinates, mea...

más de 2 años hace | 0

Respondida
Set default value for axes LabelFontSizeMultiplier
The pattern is the same, or maybe I misunderstand the question? When you get defaults from groot, it won't show all defaults a...

más de 2 años hace | 0

| aceptada

Respondida
How to write a code in Matlab having two conditions?
In MATLAB indices start with 1: n=2048; %samples fs=1024; %sampling frequency T=1/fs; t = (0:n-1)*T; F=zeros(length(t)); ...

más de 2 años hace | 0

| aceptada

Respondida
Invalid use of operator while trying to plot surface
A few issues: There's no .- in MATLAB, you use the dot to indicate you want a element-wise operation instead of a matrix operat...

más de 2 años hace | 0

| aceptada

Respondida
Is it possible to give an categorical date set values so it can be used for a plot.
Note that you can plot categorical variables in a variety of ways. Passing your categoricals directly into your plotting functio...

más de 2 años hace | 0

| aceptada

Respondida
Finding an old .m file
This one has the same author and function signature, although I obviously can't say for sure if it's the same! https://github.c...

más de 2 años hace | 0

| aceptada

Respondida
How can I save graphics as pdf?
What you typed should work, it should save the current figure (gcf) as myfigure.pdf to the current directory. I'd recommend usi...

más de 2 años hace | 1

| aceptada

Respondida
How to plot events over a signal?
@eyko you can plot the line with plot you can find the y values for the events with interp1, and plot them with plot or scatte...

más de 2 años hace | 0

| aceptada

Respondida
Remove whitespace right to colorbar
Do you mean in an export or as displayed in the figure window? For the export, if you use the newer exportgraphics instead of ...

más de 2 años hace | 0

| aceptada

Respondida
Difference between two statements
Switch doesn't provide new functionality but can make code easier to read and less complex: a='Apple'; These two blocks do t...

más de 2 años hace | 1

Respondida
how can I write a function
Your data look similar to this (as you've described them): load patients data=[{'name'} {'gender'} {'age'}; LastName Gender nu...

más de 2 años hace | 0

| aceptada

Respondida
plotting and reversing axis in subplot
I think I only see a bar and two plots. Here's some abbreviated code: t=tiledlayout(2,2); % or you can even do t=tiledlayout(...

más de 2 años hace | 0

Respondida
How to create multiple tables from a single spreadsheet
You can specify a range when calling readtable: For example: T = readtable('patients.xls',... 'Range','C2:E6',... ...

más de 2 años hace | 0

| aceptada

Respondida
Coding colors with the use of combing matrices
One thing you could do is use uisetcolor to pick the exact shade of yellow orange and pink you like Another thing you could d...

más de 2 años hace | 0

Respondida
How to get rid of floating-point constants
The error you describe isn't what I'd expect, but you're certainly missing a *. Unless exp isn't the matlab function exp and is ...

más de 2 años hace | 1

Respondida
continuous signal to discrete
You didn't really describe what you tried and where you got stuck...how about a simplified example that has all of the building ...

más de 2 años hace | 0

Respondida
How do you set every other row as well as every other column to zero?
To remove every other column, set it to empty. You can do "every other" generally using A:2:B where A is the first value and B i...

más de 2 años hace | 1

| aceptada

Respondida
Plot Mean over Box Charts using Positional and Color Grouping Variables
Boxchart makes this really difficult! The location of the categories is well defined, but the offset (while easy to calculate) i...

más de 2 años hace | 1

| aceptada

Cargar más