Forum

Notifications
Clear all

Joining two ranges as a new matrix

6 Posts
4 Users
0 Reactions
73 Views
(@iem)
Posts: 7
Active Member
Topic starter
 

Hi Dears

I have some formulas in MATLAB. It's easy in MATLAB to join 2 matrices but in excel I don't know how can do it?

my question file is attached.

example in MATLAB:

A=[1 2 3 4]

B=[5 6 7 8 9]

I want to build C like this:  C=[1 2 3 4 5 6 7 8 9]

so you can use this formula to build C from A and B:

C=[A,B]

thanks a lot

 
Posted : 01/06/2018 8:27 am
(@fravis)
Posts: 337
Reputable Member
 

There is no file attached Ahmad, but I´ll give it a try.

If it is text you are talking about, and every part of your example is in row 1, you can place in C1: =A1&" "&B1

But I don't know MATLAB, so I'm not sure what you are aiming at.

Good luck!

Frans

 
Posted : 01/06/2018 2:34 pm
(@iem)
Posts: 7
Active Member
Topic starter
 

No, I know the concatenating some texts, but it should be as number for some other calculations.

The simple file is attached.

 
Posted : 02/06/2018 4:01 am
Anders Sehlstedt
(@sehlsan)
Posts: 968
Prominent Member
 

Hello Ahmad,

I have problem understanding your question. Please give more details of what you want to do and what you want as a result.

There are plenty of functions to help you calculate the numbers.

Br,

Anders

 
Posted : 05/06/2018 1:49 am
(@sunnykow)
Posts: 1417
Noble Member
 

Try this

=SUMPRODUCT(C2:C10,CHOOSE({1;2;3;4;5;6;7;8;9},B2,B3,B4,B5,B6,F2,F3,F4,F5))

You should get the answer 793

Sunny

 
Posted : 06/06/2018 11:51 am
(@iem)
Posts: 7
Active Member
Topic starter
 

SunnyKow said
Try this

=SUMPRODUCT(C2:C10,CHOOSE({1;2;3;4;5;6;7;8;9},B2,B3,B4,B5,B6,F2,F3,F4,F5))

You should get the answer 793

Sunny  

Great answer. Great!!!

 Thanks alot, dear sunnykow.

 
Posted : 08/06/2018 7:17 pm
Share: