Get peak values from a Surface mesh figure?
Here's a solution that does not use findpeaks (since you do not have the Signal Processing Toolbox). Below, I am using MATLAB's...

| accepted

2 x 2 mixed ANOVA
It makes no sense to use multcompare here since there are only two "sessions" and only two "groups". multcompare is used when t...

How to synchronize signals at different frequency in the same table
A1 = table2timetable(A); B1 = table2timetable(B); C1 = table2timetable(C); TT = synchronize(A1, B1, C1);

| accepted

How to calculate the area under the curve with data given on an excel file, and not using the function "trapz"?

| accepted

Combine two tables based on date time
TT1 = table2timetable(A); TT2 = table2timetable(B): TT3 = synchronize(TT1, TT2);

Repeated-measures ANOVA with no between-factor
You don't need a between-subjects factor to use ranova. Your design has two within-subjects factors, and that's just fine. I s...

Error using Plot, Vectors must be the same length
Your vector Height has six elements, with 0 as the first element. Given this, your apparent effort to plot v vs. Height is caus...

| accepted

post hoc comparisons multcompare
There are no t-values with the multiple pairwise comparisons tests performed by multcompare. These tests -- Tukey-Kramer, Schef...

Which pairwise hypothesis test is used on multcompare
The pairwise comparisons test used by default with multcompare is Tukey-Kramer. Using the ctype option, you can change the test...

Identifying significantly different pairs from multcompare output
The significantly different pairs are identified by the p-values in column 6 of the c matrix generated by multcompare. Here's an...

How can I test for significance between expected and observed outcomes?
Since there were only two conditions, you can use a t-test (i.e., an anova isn't needed). Here's an example using test random d...

multcompare for vartestn?
@Tahariet Sharon It is true that multcompare cannot work with input from vartestn. A frustration with multcompare is that it ca...

| accepted

how to find the hourly average of datetime series
TT1 = table2timetable(Data); TT2 = retime(TT1, 'hourly', 'mean'); % hourly averages TT3 = retime(TT1, 'daily', 'mean'); % dai...

| accepted

Filtering a table with datatime on dates
To remove rows corresponding to 2019-10-01, this should work: d = datetime(2019,10,01); removeLogical = isbetween(tmp.Var2, d...

Errors in Repeated Measures Model function fitrm
Here's an image of the data in this question: The data are in the attached file, testdata.txt. Design summary: This is a s...

two way repeated measures anova
Visit this question for a simple approach to doing a two-way repeated measures (aka within-subjects) anova using the ranova func...

How to use ranova?
You note: it seems like I need a variable that is not "within subject" to get ranova to work. Actually, that's not the case. Y...

Repeated measures ANOVA with two variables
Here's what I put together. None of the effects are statistically significant. See below. Were the data in the Value column ...

| accepted

How to use 'factorgap' to set larger gaps between groups of boxplot.
It is important to distinguish between a group and the members or elements of that group. The documentation on this point is poo...

| accepted

Regression/ Ordinary Least squares on a custom equation
This is probably too simple to be correct, but I'll toss it out there anyway. Admittedly, I haven't considered anything you wri...

Find a random position in a vector where the value is zero
% test data (includes zeros and imaginary numbers) A = [1i 4/1j 7 0 99 0 0 0 8*1j 0 0 0 8 9 0 -7 0]; % find indices of zeros...

| accepted

Area under the curve ignoring axis values (Absolute area)
@Ganesh Naik Here's a new answer that uses ginput to "select" data points along the line for definiing the area of interest. Y...

How can extract data in scatter plot??
% test data x = rand(1, 100); y = rand(1, 100); % find elements for class 1 (x is between 0 and 0.1) idx = find(x >= 0 & x...

| accepted

Area under the curve ignoring axis values (Absolute area)
The trapz function uses integration so the result is the area under the curve. That's not what you want. I suggest you first c...

| accepted

How to search closest coordinate values in a Lat Long Z data
You can do this with the pdist2 function. For latitude and longitude, usually the haversine method is used. Google it if you w...

Using writetable in a for loop to create new txt/csv files for each step
Under the assumption your code is working fine except for the filename issue, here's what I suggest. Use this to create a new f...

| accepted

Question

Problem using ranova for analysis of variance
I'm trying to use ranova to analyse data from a fairly simple experiment, but am not successful as yet. The data (60x3) are att...

### 1

sorting a matrix of 4 rows by the fourth element and outputting of combinations that make the 4th row element