Info

This question is closed. Reopen it to edit or answer.

How do I run a function through every column of an imported table, and have an output for EACH column in a row matrix?

1 view (last 30 days)
Attached is the work space with the 502*99 matrix. Essentially I am trying to run the function of norminv(tcdf) through column 1, produce an input, and then apply the same function to the next column. My eventual output is a 1*99 row matrix.
How should I code?
CN = arrayfun (@(trial2Q3) norminv(tcdf(trial2Q3,4),0,1))
  1 Comment
dpb
dpb on 26 Feb 2015
tcdf and norminv are already vectorized for input arrays producing a result for each element in the array.
It's not clear to me what you want to do to reduce the vectors of length 502 down to 1. Is the array trial2Q3 a set of t-statistics for a cumulative distribution, maybe? If so it would seem the end result desired might just be
norminv(tcdf(trial2Q3(end,1),4),0,1)
the values for the last row?
If not, need more explanation of what you've got and what you're trying to compute.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!