To subtract a vector just from a table in MATLAB, you can use the following code:
main.m166 chars10 lines
Here, we have a sample table t
with two columns - 'A' and 'B'. We also have a vector v
which we want to subtract from t.A
. We achieve this by simply subtracting v
from t.A
and storing the result back in t.A
. The updated table is then displayed on the command window using the disp()
function.
gistlibby LogSnag