Calculate correlation. - MATLAB Cody - MATLAB Central

Problem 43274. Calculate correlation.

Difficulty:Rate

There are two data.

y1=[0 1 2 3 4]'
y2=[2 3 4 5 6]'

We can see positive relationship between y1 and y2. The relationship between two data can be estimated using correlation coefficients.

https://en.wikipedia.org/wiki/Correlation_and_dependence

Calculate this between y1 and y2.

Solution Stats

39.89% Correct | 60.11% Incorrect
Last Solution submitted on Mar 13, 2025

Problem Comments

Solution Comments

Show comments
PIVlab surpasses 100K all-time File Exchange downloads
During the past twelve months, PIVlab, a MATLAB Community Toolbox for particle...
3
5
LLMs with MATLAB updated to support the latest OpenAI Models
Large Languge model with MATLAB, a free add-on that lets you access...
2
4

Problem Recent Solvers70

Suggested Problems

More from this Author27

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Go to top of page