How to expand matrix

3 views (last 30 days)
Kamil Kacer
Kamil Kacer on 10 Dec 2020
Commented: Ameer Hamza on 10 Dec 2020
Hi I have matrix 1 row 12225 columns and I want to colerate in with matrix 1 row 12230 columns how to I round them to same length please

Accepted Answer

Ameer Hamza
Ameer Hamza on 10 Dec 2020
Edited: Ameer Hamza on 10 Dec 2020
You can shorten the second vector by removing the extra elements
A; % 1x12225 vector
B; % 1x12230 vector
B_new = B(1:numel(A));
corrcoef(A, B_new)
  2 Comments
Kamil Kacer
Kamil Kacer on 10 Dec 2020
Thanks so much
Ameer Hamza
Ameer Hamza on 10 Dec 2020
I am glad to be of help!

Sign in to comment.

More Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!