Respondida
How to plot a tiled layout using a loop?
> should a nexttile be in the loop? Yes, but the tiled layout should be defined before the loop. The first two examples list...

más de 5 años hace | 4

Respondida
Stop & pause a simulation in app designer using push button
There is no built-in method for pausing a process as of r2021a. Here's how I've achieved this behavior in apps. The main ide...

más de 5 años hace | 5

| aceptada

Respondida
Most efficient way of creating variables
It's good that you're following that advice. E = [V1(:,10), V2(:,10), . . ., Vn(:,10)]; % most efficient method of this list ...

más de 5 años hace | 0

| aceptada

Respondida
How to calculate the confidence interval from distributions overlap
It sounds like what you're looking for is to find the number of standard deviations between the mean of the orange distribution ...

más de 5 años hace | 0

| aceptada

Respondida
how to expand 2D array?
m = [1 2 3 4 5 6 7 8]; y = reshape([[m;nan(size(m))],nan(size(m,2))],2,[]) Version 2 after quest...

más de 5 años hace | 0

| aceptada

Respondida
filling gaps in time data series with NaN
Compare the original vector of datetime value with the interpolated vector using ismember. This will create a logical vector id...

más de 5 años hace | 0

Respondida
Return to GUI after Running Data
There's a line in the GUI code or within one of the callback functions that is closing the GUI figure or making it invisible. Lo...

más de 5 años hace | 1

| aceptada

Respondida
Extract x,y,z coordinates from figure
Depending on how you plotted the 3D surface, you may already have those coordinates before the plot is produced. For example, ...

más de 5 años hace | 0

Respondida
How do I use an if statement to check if a data is present on a excel sheet?
At the top of the documentation page for xlsread there is warning that xlsread is not recommended and it suggests alternative fu...

más de 5 años hace | 0

Respondida
Breaking and spliting vector into groups and averaging
timevec = [0 2 3 4 5 0 9 3 4]; chunk = [0 0 0 1 1 1 1 0 0]; g = cumsum([1, diff(chunk)]~=0); % assuming 'chunk' is a row vec...

más de 5 años hace | 2

| aceptada

Respondida
App designer - display multiple ROI on the same image
I assume "doesn't like this syntax" means that the crosshairs and circle are appearing on a different figure. The reason that...

más de 5 años hace | 1

| aceptada

Respondida
App Designer - help with syntax for referring to an array's indices
The question is mostly clear and the image is helpful. Interesting approach to align the buttons with the UITable rows - I like...

más de 5 años hace | 1

| aceptada

Respondida
Use findpeaks on specific frequency range
Limit the range of the peak-search by limiting the inputs. I can't see the x-ticks in your image but this example ignores any...

más de 5 años hace | 0

| aceptada

Respondida
How do we store the results of a loop vertically?
> Is this a correct way to store the values of a loop vertically in an excel file? CompiledResults(:,i) = Output Well, no. T...

más de 5 años hace | 0

| aceptada

Respondida
How to merge two timetables with different data and time?
> [T1;T2] is not working and retrns the following error: All tables in the bracketed expression must have the same number of row...

más de 5 años hace | 0

| aceptada

Respondida
How to have a stack plot with different colors?
To change the axis background color, https://www.mathworks.com/matlabcentral/answers/486181-is-it-possible-to-change-stackedp...

más de 5 años hace | 1

| aceptada

Respondida
Convert timetable into matrix where time is a variable
A = [minutes(TT.Time), TT.Var1];

más de 5 años hace | 1

| aceptada

Respondida
How to find standard deviation and mean for this monte-carlo simulation
You either need to store the values within the loop or you can get rid of the loop and use vectorization. N = 100; x = rand...

más de 5 años hace | 0

Respondida
3D bar axis label
set(gca,'ytick',1:4,'yticklabel',compose('Pack %d',1:4))

más de 5 años hace | 0

| aceptada

Respondida
Getting an error that says a variable is not defined in my code, but i have defined it in my function file
Functions have their own workspace (exception:nested functions). Variables are not shared between workspaces unless you explici...

más de 5 años hace | 0

| aceptada

Respondida
Change color on a single bar
You have to set FaceColor to 'flat'. https://www.mathworks.com/matlabcentral/answers/553894-barcharts-colours-based-on-other-ve...

más de 5 años hace | 2

| aceptada

Respondida
Find the first and last 1 in each column
X = [NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN 0 0 0 0 0 0 0 0 0 0 ...

más de 5 años hace | 0

Respondida
Shift columns of a matrix with different values
Method 1: indexing with rem This method shifts values rightward in each row of the nxm matrix A by the amounts specified in vec...

más de 5 años hace | 1

| aceptada

Respondida
intersection area of 3 or more rectangles
This approach is inspired by the even-odd rule for determining if a point is inside a polygon. If the max left-edge value is sm...

más de 5 años hace | 0

| aceptada

Respondida
overtop IMAGESC text and change colorbar colors in white for some value of the text
The 0.0% values are rounded to 1dp so any values between -0.049 and 0.049 will show 0.0%. So, you need to find the indices of f...

más de 5 años hace | 1

Respondida
subplot aligment automatic method
Method 1: equate axis sizes for all axes after adding colorbar Size of axes without a colorbar will be set to the size of axes ...

más de 5 años hace | 1

| aceptada

Respondida
Can I create a drop down menu in App Designer in which the drop down items reference a cell array?
The handle to the dropdown menu must be available in the same workspace that updates the cell array. If that's done in AppDesig...

más de 5 años hace | 0

| aceptada

Respondida
how to define a gradient colormap
You need to define the colorscale using caxis. caxis([-1,1]) to apply to all axes, arrayfun(@(h)caxis(h,[.2,.6]),ax) % ax i...

más de 5 años hace | 0

Respondida
Date formats 'uuuu' vs 'yyyy', 'mm' vs 'MM'
The confusion is warranted and due to inconsistencies in Matlab's date-time formats. datetime format uses MM/mm for months/min...

más de 5 años hace | 2

| aceptada

Respondida
Plot Cook’s distance for mixed effects model
plotDiagnostics is a public method of the LinearModel class. The function is defined in LinearModel.m and recieves a LinearMod...

más de 5 años hace | 1

Cargar más