Answered
How to count date occurrence independently of year?
This solution creates a table (T) that lists all month-day combinations in your data in 1 column and the count in the 2nd column...

7 years ago | 0

| accepted

Answered
Alternative to "drawnow" to plot real time data inside while loop
"Are there alternatives to "drawnow" to plot complex data in real time?" I can think of two things to try. 1) instead of call...

7 years ago | 1

| accepted

Answered
how can i add two matrix vertically with different column
Bpad = padarray(B,[0,numel(A)-numel(B)],'post'); C = [A;Bpad]

7 years ago | 1

Answered
How to put uitable in new figure using GUIDE?
You can keep the UI table on the main GUI window and toggle its visibility using the "Visible" property. When the UI table is n...

7 years ago | 1

| accepted

Answered
Count how many elements are present inside arrays
Here is an anonymous function that can be applied to any two vectors. The vectors can be any lengths and any orientation (row or...

7 years ago | 0

Answered
remove repeated rows to produce two new matrices
% Convert b to [first,last] non-zero per row b2 = splitapply(@(x)x([find(x~=0,1,'first'),find(x~=0,1,'last')]),b,(1:size(b,1))....

7 years ago | 0

| accepted

Answered
Does the One-way ANOVA test on MATLAB check that the conditions for applying ANOVA are met?
Great question, +1 Matlab does not perform any assumption checks to my knowledge. So yes, you need to perform those tests pr...

7 years ago | 0

Answered
Change "Items" in a Discrete Knob with another knob
For Knobs (continuous) There are a few things wrong with your callback function. I've listed them in order of importance. Th...

7 years ago | 0

| accepted

Answered
average RGB values from list of pixels.
If x is your 1xnx3 array, meanRGB will be a 1x3 vector of the average rgb values. meanRGB = mean(squeeze(x),1); Here's th...

7 years ago | 0

Answered
How to get normalized coordinates of an ROI?
"How do I convert these pixels to normalized cooridinates? " You can do the conversion yourself by dividing the ROI pixel dimen...

7 years ago | 0

| accepted

Answered
How to draw the below type of graph in MATLAB?
"Feb" in your excel file has a $ character which needs fixed. If you have many excel sheets, you can fix it from within the cod...

7 years ago | 3

Answered
Find a raw position referred to a value in a matrix
rowNum = find(any(A > 2000,2),1,'first');

7 years ago | 0

| accepted

Answered
fmincon and Getting "Solution" Before Convergence Tolerance is Hit
From the Editor, press the pause button (first panel below). Execution will eventually pause but it may not be within the funct...

7 years ago | 1

| accepted

Answered
How I can solve, index exceeds matrix dimensions
The code that contains the problem is copied below from your pdf attachment. The error happens when 'o' becomes larger than the ...

7 years ago | 0

| accepted

Answered
Plotting 3D scatter plot from elements in a matrix
m = randi(100,47,4); % Here is your (fake) 47x4 data [x ,y] = ndgrid(1:size(m,1),1:size(m,2)); % produce x and y coordi...

7 years ago | 0

| accepted

Answered
Why can't I use a variable to put all .txt files in a directory into an array?
Here's a bunch of feedback. 1) don't use "clear all". Here's why: link. clc clear % clear all % avoid doing this. 2)...

7 years ago | 0

Answered
Migrated GUIDE to App Designer -- App partially off screen
Open the app in appdesigner. In the component browser, select the main figure. Then check the "Position" property and deter...

7 years ago | 2

| accepted

Answered
How do I get rid of the dotted lines when using multcompare?
[results,~,h] = multcompare(stats,'Dimension',[1 2]); %return 'h', the figure handle axh = gca(h); % get the ...

7 years ago | 0

| accepted

Answered
How to creat autoumaticly a file .mat without removing the last one
Here are some suggestions. Input filename or file number One of the function inputs can be the filename of the mat file. fu...

7 years ago | 0

Answered
Basic menu with options
"Is there anyway I can keep the same values on the second menu as the first menu after one option is removed?" Instead of using...

7 years ago | 0

Answered
grpstats for several variables
Have a look at the list of statistics that are accepted as character vectors. Note that 'median' is not one of the options. h...

7 years ago | 1

| accepted

Answered
Replacing multiple values at specific indices in a matrix with a single value
ismember() will return a logical array the same size as 'd'. If you need ones and zeros rather than true and false, you can con...

7 years ago | 0

Answered
Link specific coordinates to a color when plotting them
When you use plot(x,y) it returns 1 handles and you cannot specify different colors to objects within the same handle. You ca...

7 years ago | 0

Answered
Sorting points based on comparing distances.
Use the 2nd output to min() to pair the points in B to the nearest points in A. Then use splitapply to segment the points in B ...

7 years ago | 0

| accepted

Answered
I wish to open a saved figure in the figure number of my choice.
When you open a figure it takes the next available figure number and the figure number property is read-only and cannot be reass...

7 years ago | 0

Answered
Resample with replacement - bootstrap Kolmogorov–Smirnov test
"How can I resample n observations with replacement without using this kind of built in functions?" Those function can be usefu...

7 years ago | 0

| accepted

Answered
How to separate a portion of filename from a file
[~, fname] = fileparts('scrubbed.MOD_D3_AOD_550.20020112.nc'); [~,tok] = regexp(fname,'.(\d+)$','match','tokens'); str = tok...

7 years ago | 0

| accepted

Answered
GUI wait for uitable callback to write data to variable
Fixing the callback definition and function To start, the callback function cannot have an output. Although character vector d...

7 years ago | 1

Answered
convert celsius to fahrenheit with a popupmenu
The callback function to the "calculate" button should do the following, Get the string property in "temperature" field and co...

7 years ago | 0

Answered
How to do matrix or table multiplication?
resultTable = repmat(ExhaustTable,1,3) + repelem(IntakeTable,1,3) Or, if the number of columns vary, resultTable = repmat(Exh...

7 years ago | 1

Load more