MATLAB: Multiplying an entire table by a column from another table.

columndata processingmultiplicationtable

I want to take my a table of "data" and multiply it by a specific column from another table to result in "processed data". I have tried different multipication functions but I am always given the error "Undefined operator '.*' for input arguments of type 'table'." Is there a specific function that I am unaware of? I am running Matlab R2019a. Thank you.

Best Answer

Use the varfun function.
Example —
T = array2table(randi(99, 7, 5));
V = randi(99, 7, 1);
TV = varfun(@(x)x.*V, T);
Related Question