Réponse apportée
How to build and call an array of objects containing a table of data
How about something like test=timetable(datetime(2020,2,13+[0;sort(randi(20,4,1))]),randi([120 240],5,1),'VariableNames',{'Temp...

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
How to get real p value in the 'multicompare' output table instead of rounded number
As Walter points out beflow, that it prints an integer zero indicates the calculation of the p-value underflowed and the returne...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
How to Compare multiple rows of the Same txt file at the same time.
Read the file(s) into memory with importdata or other high-level function appropriate to the format; then use diff() on the seco...

plus de 5 ans il y a | 0

Réponse apportée
finding non-zero entries of a matrix
C=A|B;

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
Resizing Figure to Make Room for Title without Resizing Plot
hAx=gca; hAx.Position=hAx.Position.*[1 1 1 0.95]; adjusts the height of axes to be 95% of default/previous height. Adjust to ...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
fitting a sloped gaussian
First pass...overall not so great; need to do more to figure out how to model background. My spectroscopy background has dealt ...

plus de 5 ans il y a | 0

Réponse apportée
I am trying to find the shortest path possible in an array of numbers using MATLAB and I keep getting "Index in position 1 exceeds array bounds (must not exceed 5).". I tried changing 5 to any other number and it didn't work. Can anyone please help?
Easy to forget/overlook... n=1: ... while itr < 5 distance = distance + norm([randomA(n,1) randomA(n,2)] - [randomA(n+1,1)...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Writing a small epsilon in xlabel with color
W/o taking time to try to figure out specific LaTeX syntax inside MATLAB that's always a pain since know nuthink' about LaTeX ot...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
What frustrates you about MATLAB? #2
So many of the nits in graphics are just irritants/time-consuming to make things look decent -- The inconsistency by using '%g"...

plus de 5 ans il y a | 1

Réponse apportée
Using uigetfile to read in MATLAB array - index exceeds number of array elements
The form of load with an assignment on the LHS returns the content of the .mat file in a struct with the variable names in the ....

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
how can i change the color of the text in the dialog box of errordlg ?
Use the \color{specifier} modifier for the text string passed. Will have to create an options struct to set interpreter to 'Tex...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
sorting is not sorting?!
sortrows(y,3); is a no-op because you didn't save the result. y=sortrows(y,3);

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Add leading decimal places to numbers in text file
Air code--caution!!! c=readcell('YourTextFile.ext'); % bring file in as cellstr() array isDR=startsWith(c,'DataReg'); ...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Linking variable name/symbol to sequential retrieval of FRED data files.
"-the answer to your q is yes, this particular series are all on monthly freq and return the same dates." Ah! Was hoping for t...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
how to create a chart with two x axes, one of which with month / day
Given you have 2019 in the variable names but won't give actual start/stop dates/times... x1=linspace(0,17508,17508) is a 17,5...

plus de 5 ans il y a | 0

Réponse apportée
how do i rearrage words in an alphabetical order in an array?
names =sort( split(' john alex peter matthew' )) names = 5×1 cell array {0×0 char } {'alex' } {'john' }...

plus de 5 ans il y a | 0

Réponse apportée
Output argument "x3" (and maybe others) not assigned during call to "threeptb"
I just worked through at command line -- >> fnK =@(x) (1.11 + 1.11*(x/10)^(-0.18))/(10-x); % the obj() function >> x1=1;...

plus de 5 ans il y a | 1

Réponse apportée
Changing file save name
Just add a counting variable that is incremented inside the inner loop-- ... j=0; for n = 1 : non_binary_images for k = 1 ...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 5 ans il y a | 1

Réponse apportée
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...

plus de 5 ans il y a | 0

Réponse apportée
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...

plus de 5 ans il y a | 0

Réponse apportée
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

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 5 ans il y a | 0

Réponse apportée
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 = ...

plus de 5 ans il y a | 0

Réponse apportée
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)) ...

plus de 5 ans il y a | 0

Réponse apportée
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://...

plus de 5 ans il y a | 2

| A accepté

Réponse apportée
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)).';

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
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 ...

plus de 5 ans il y a | 0

| A accepté

Charger plus