Trying to get a table output when inputs are arrays for norminv function

1 view (last 30 days)
I have input data (for weight) in 7 samples for a mean, std error of the mean, and number of participants in each sample. I data for 7 conditions and I would like to produce data at the following intervals on the image under p.
Each input is a 7*1 double, apart from the propbability intervals (9 parts) . I would like to produce new actual weight values at each probability.
How can I use the normiv function to take data from one of my samples ( input of p,mean,std) and produce 9 weight values for each sample?
Using this code I get the following meassage "Error using norminv (line 63)
Non-scalar arguments must match in size."
Many Thanks
Dylan
  7 Comments

Sign in to comment.

Accepted Answer

Torsten
Torsten on 17 Apr 2022
Maybe you want something like this:
for i=1:numel(mu)
x(:,i) = norminv(p,mu(i),sigma(i));
end

More Answers (0)

Categories

Find more on Creating and Concatenating Matrices in Help Center and File Exchange

Products


Release

R2021a

Community Treasure Hunt

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

Start Hunting!