Is it possible to automatically output many possibilities using a loop?
이전 댓글 표시
I have the number let's say 100, I found its initial factors which are 4 and 50. I would then like to use these factors to divide by the input 100. 100/50= 2, then 50/2 = 25. You can see the pattern where the denominator becomes the numerator and the answer becomes the denominater but, I would like to know a way to do this automatically without the need of manually typing it down. All the possible outputs will then be stored in a cell array and displayed e.g. [50,4,2,25...]. It doesn't have to be ordered.
Is this possible? I have been trying to do this but have not achieved much progress.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!