Answered
How do I change position of titles and subtitles of subplots?
Try str=compose('Currents at %d mV ', [-70:10:0]); hposn={'left','right'}; figure for i=1:8 hAx(i)=subplot(4,2,i); hT...

5 years ago | 1

Answered
Append to vector of different sizes in for loop
The short answer is i = 1; A=[]; for i=1:2:numel(ipts) A = [A;TimeSeries_short(ipts(i):ipts(i+1),:); end Normally one fr...

5 years ago | 0

Answered
Two colormaps for same worldmap axis
You can only set one colormap for one graphic object with a colormap property -- colormap(target,colormap) ... target — T...

5 years ago | 0

Answered
how to generate let's say 1000 points in 2 dimensions uniformly distributed in the range xmin xmax ymin ymax
So what's wrong with rndxy=randi([5 30],100,10); ? Shape however wished; of course the dimensions have to be factors of N

5 years ago | 0

| accepted

Answered
Date axis in matlab heatplot
" I have converted the dates into number in excel and using those numbers to plot" Don't do that!!! Read the dates as datetime...

5 years ago | 0

| accepted

Answered
mutiplots in a single GUI figure
"...I need to plot all the three sets of data, I added hold off close the old plots on each new run..." That's exactly the wron...

5 years ago | 0

Answered
Declare a table where each column variable is an array of numbers
Your table entries must be cells, not arrays-- >> t=table({1:3}) % NB: the cell array is the quantity for the table t = ...

5 years ago | 0

Answered
Scatter of large dataset indexing figure name
N=size(A,2); for i=1:N for j=i+1:N figure scatter(A(:,i),A(:,j)) xlabel(string(i)) ylabel(string(j)) ...

5 years ago | 0

Answered
How to plot this graph
TMW has never seen fit to add the functionality to base 2D graphs for some reason -- fortunately, there's File Exchange https://...

5 years ago | 2

| accepted

Answered
How to generate a 10-bits digital signal which the 10 digits are “1753682094"
d=sscanf('1753682094','%1d'); ym=kron(d,ones(Ta/Ts,1)).';

5 years ago | 0

| accepted

Answered
Plotting scatter plot using X coordinate matrix and Y coordinate matrix
Don't need any loops X=x_coor(:); Y=y_coor(:); % vector; not required to plot, just to keep original data unchanged XLIM...

5 years ago | 1

| accepted

Answered
How to find the maximum and minimum value in the interval of a graph?
%load the file load('tokyoDart.mat'); %there are two column vectors: sampleTime and waterHeight %sampleTime is a datenumber ...

5 years ago | 0

| accepted

Answered
How to compare two arrays and add elements to the first one
You were on the right track... [LIA,LOCB]=ismember(A1(:,1),A2(:,1)); % find locations in respective arrays first column...

5 years ago | 0

| accepted

Answered
How to create separate tables from a data set
Boy! is that a mess! Why people/vendors do such things is beyond ken. Another start... G=readcell('Level Reduced.csv'); ...

5 years ago | 1

| accepted

Answered
Error using tabular/plot
Named parameters must follow X,Y,linespec triplets. plot(t,V,'r','LineWidth',3); instead. Or, alternatively, plot(t,V,'LineWi...

5 years ago | 0

Answered
How to perform a task on each 2D within a 3D array and get back the 3D at the end of it?
... non_uniform_FFT= DFTmtx* k2F;% This is a 2D array after each iteration. non_uniform_FFt= cat(3,non_uniform_FFT,non...

5 years ago | 0

| accepted

Answered
Importing date and time from a txt file
Add the first column datetime() and the second column duration(), or Read the file as fixed-width combining the first two colum...

5 years ago | 0

Answered
How to save an excel file to a specific path using ActiveX controls?
You don't give a fully-qualified filename; what else is it to do but use system default? [file,path]=uiputfile('.xlsx'); Workb...

5 years ago | 0

| accepted

Answered
How to combine stacked bar chart and line chart?
Seems to work fine here... figure hB=bar(step,array,'stacked'); ylim([0 16]) xlim(xlim+[1 -1]*500) yyaxis right hL=plot(st...

5 years ago | 0

| accepted

Answered
How to approximate value to values in an array
See doc interp1 with 'nearest' method.

5 years ago | 0

Answered
Match Xticks to Datapoints
x=[1 10 30 125 250 500]; plot(x,sort(randi(40,[6,1])),'*-') xticks(0:100:500) will duplicate the above with the addition of a...

6 years ago | 0

| accepted

Answered
Match Xticks to Datapoints
"with datetime, but then it is impossible to just display days and not specific dates." Au contraire, good buddy! tt=array2tim...

6 years ago | 0

Answered
How to group data within a column by specific text within that column
Illustration with faked data... tmp=categorical({'star','bat','crab'}); % the categorical variable categories t=table(tmp(...

6 years ago | 0

Answered
is there a way to plot change point detection on a scatter plot?
See if <Piecewise Polynomial> is what you're asking for...

6 years ago | 0

| accepted

Answered
How to group data within a column by specific text within that column
A sample dataset always helps, but probably be good to convert species to a categorical variable first (although not mandatory)....

6 years ago | 0

Answered
How can I replace outliers with 2 standard deviation from the mean
Can't do it with filloutliers alone; it for some reason doesn't have the facility to use a function handle as a fill option... ...

6 years ago | 1

| accepted

Answered
How to make this function run faster
For starters, try... ... IJ=inv(J); for i = 1:2 for j = 1:2 for k = 1:2 for l = 1:2 AA = IJ*F(i,1)*F(...

6 years ago | 0

| accepted

Answered
Generating non-repeating numbers by using a for-loop and break statement
The function doesn't return anything, though...either your original nor mine. I didn't catch that before. If the idea is to re...

6 years ago | 0

Answered
Plotting a curve with just x values
Something like x=[3,3,4,5]; n=histc(x,unique(x,'stable')); v=[1:numel(n)]; m=fitlm(v,n); bar(n); xlim(xlim+[1 -1]*0.5) ho...

6 years ago | 1

| accepted

Answered
Expected input number 2, edges, to be one of these types
W/O the Statistics TB, you'll have to resort to some other way to compute the wanted distribution quantities -- a quick look at ...

6 years ago | 1

Load more