- Request user input for the 4-band color code. (See https://www.mathworks.com/help/matlab/ref/input.html)
- identity the 4-band color code in the standard RGB
- lookup the corresponding values from the table
- determine the resistance of the resistor.
- display the result (see https://www.mathworks.com/help/matlab/ref/fprintf.html)
how i start?
조회 수: 1 (최근 30일)
이전 댓글 표시
답변 (1개)
Sam Chak
2022년 4월 8일
편집: Sam Chak
2022년 4월 8일
@shamsa khalid
I'll give a general idea. You need to search some functions on the help documentation.
The chart is essentially a table. Perhaps you can create a table and then write a function to do the following:
댓글 수: 2
Sam Chak
2022년 4월 8일
After giving some thoughts, I think RGB values and the table are not needed in your case. If the color band is Brown, Orange, Green, Gold, then you can display an image and ask the user to enter accordingly:
code = [1 3 5 G]
and hit 'Enter'. The algorithm should determine and display the resistance as:
Ohm with % tolerance.
Note that Band #3 Black should be 0 because .
참고 항목
카테고리
Help Center 및 File Exchange에서 Matrix Indexing에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!