Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
how to merge/join vectors in cell array

Subject: how to merge/join vectors in cell array

From: Q Zhang

Date: 15 May, 2011 14:16:05

Message: 1 of 1

Dear all,

How could I realize the inner join using the Matlab 2008R version?

I don't have the following code in my current 2008 version, could someone help me with the inner join task like below using the simple join(a,b,keys) method?
THX
cinner = join(a,b,'key','Key1','Type','inner',...
   'MergeKeys',true)

a =

    Key1 Var1
    'a' 1
    'b' 2
    'c' 3
    'e' 11
    'h' 17

b =

    Key1 Var2
    'a' 4
    'b' 5
    'd' 6
    'e' 7

cinner =

    Key1 Var1 Var2
    'a' 1 4
    'b' 2 5
    'e' 11 7
http://www.mathworks.com/help/toolbox/stats/dataset.join.html

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us