How to find all pairs, triplets, etc in MatLab?

  • Context: MATLAB 
  • Thread starter Thread starter elhabby
  • Start date Start date
  • Tags Tags
    Matlab
Click For Summary
SUMMARY

The discussion focuses on calculating averages of pairs, triplets, and up to 30 measurements using MATLAB for a dataset comprising 30 time series measurements over 100 years. The user seeks guidance on systematically averaging these combinations in MATLAB, emphasizing the need for clear instructions to translate manual averaging processes into MATLAB code. The conversation highlights the importance of understanding MATLAB functions and indexing to effectively manipulate and analyze time series data.

PREREQUISITES
  • Basic understanding of MATLAB syntax and functions
  • Familiarity with time series data manipulation
  • Knowledge of combinatorial mathematics for pairs and triplets
  • Experience with MATLAB indexing and array operations
NEXT STEPS
  • Learn how to use MATLAB's "nchoosek" function for generating combinations
  • Explore MATLAB array operations for efficient data manipulation
  • Study methods for calculating averages in MATLAB using "mean" function
  • Investigate time series analysis techniques in MATLAB
USEFUL FOR

This discussion is beneficial for MATLAB beginners, data analysts, and researchers working with time series data who need to perform statistical calculations on multiple measurements.

elhabby
Messages
1
Reaction score
0
Hi,

I´m a complete MatLab noob and just started using it. I have a set of 30 timeseries measurements (so for a period of 100 years I have 30 measurements for every year, but some years do not have all 30 measurements) and I am trying to find the average of all possible pairs, triplets, etc until the full 30 average for every year. This is probably relatively simple to do if you understand MatLab, but unfortunately I do not, so if anyone can help me with this problem, I´d much appreciate it.
 
Physics news on Phys.org
Welcome to PF;
How would you go about averaging all possible pairs on paper? In a systematic way?
Translate that process into MATLAB instructions.

Repeat for triplets.

note "...until the full 30 average for every year" makes no sense.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 22 ·
Replies
22
Views
4K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 10 ·
Replies
10
Views
4K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 4 ·
Replies
4
Views
6K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 4 ·
Replies
4
Views
4K