Sampling iteratively random value from a matrix/array
이전 댓글 표시
k = unique(ID_site)
rl = [0.7 0.8 0.85 0.95 1]
rs = [0.65 0.7 0.75 0.8 0.85 0.9 0.95]
im = [0.55 0.65 0.75 0.85 0.9 0.95 1]
ka = [0.92 1]
for i=1:numel(k)
tc1 = rl.*rs.*im.*ka
tc2 = rl.*rs.*im.*ka
tc3 = rl.*rs.*im.*ka
end
Hello,
I want to calculate the products tc1, tc2 and tc3 several times (10000 nsamples) for each ID_site, sampling each time a random value from rl, rs, im and ka.
The output should display 10000 results of tc1, tc2 and tc3 for each test site.
Does anyone knows how to do that?
Thank you very much
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!