MATLAB Answers

Ken Lee
0

How to combine variables from different workspace

Asked by Ken Lee
on 1 Jul 2019
Latest activity Commented on by Stephen Cobeldick on 1 Jul 2019
Hi all
I got 5 nos. of tables named "KENJUICE1", "KENJUICE2", "KENJUICE3", "KENJUICE4" and "KENJUICE5" (46 columns with different nos. of rows) in workspace.
I would like to combine those variabes in columns named "Irms_A_avg", "PowerP_A_avg" and "PowerS_A_avg" as 3 columns with summation of "KENJUICE 1 to 5" rows.
May I know anyway to do that instead of COPY and PASTE for each workspaces?
Many thanks for the help.

  5 Comments

"KENJUICE1", "KENJUICE2"... Do not hide indics in the names of variables. If the variables contain equivalent objects, use an array instead, here a cell array: KENJUICE{1}, KENJUICE{2},...
Many thanks Jan What is the difference applying variables instead of array. I checked other posts but sill no idea why shall we do it. Do you have any suggestions on waveform identification?
"What is the difference applying variables instead of array. I checked other posts but sill no idea why shall we do it"
Putting meta-data into variable names requires slow and complex code to process them.
In contrast indices are simple and very efficient.

Sign in to comment.

Tags

0 Answers