Pick matrix vom struct with certain probability
이전 댓글 표시
I want to pick a matrix from a structure with a certain probability. For example I have a structure with two matrices for 2 different energies. And I want to pick several times some values from the matrices with the probability from "spec".
Econtainer = struct('E_low',{pro50keV},'E_high',{pro75keV});
spec = [0.3,0.7];
So in 70 percent of the cases I take "E_high" and som e values from there for my further work.
Is it a bad Idea to use "struct"?
Thank you a lot for your help.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Structures에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!