MATLAB Answers

How can I concatenate these two arrays in this manner?

2 views (last 30 days)
Sad Satan
Sad Satan on 21 Aug 2020
Commented: Fangjun Jiang on 21 Aug 2020
Lets say I have the following two arrays:
A = [0.707, -0.707]; B = [0, 2];
and I want to concatenate them such that the result is:
C = [0.707, 0 , -0.707 , 2];
I have tried every trick but no luck so far. Any ideas? While there is probably a way to concatenate the two manually, I want a process that works on any matrices of different lengths, etc.


Sign in to comment.

Answers (1)

Community Treasure Hunt

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

Start Hunting!