Display matrix results with message
이전 댓글 표시
I'm new to Matlab, and just finishing up a semester of a programming class. This is only the second week of Matlab instruction. I have written a program that takes input from a file with 20 rows and one column of data. It performs calculations on that data, and creates a graph comparing the original data and the calculation, which is also stored in a matrix with one column being the original data, and the second column being the calculation. I can do all of that just fine. I can also print this output in columns to the screen. What I can't figure out is how to loop through the final output and print a message if the calculated data is above a certain value, in this case 125. So I'd like to print each row, and if the calculated data is above 125, also print a message. I had a tough time with looping in C, which was covered during most of this semester, but I figured it out as I progressed. There was a similar requirement on the last assignment which I turned in without having figured it out. Just need some guidance on how to approach this.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Call Python from MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!