- MATLAB Answer on a similar case
- Seven Segment Display on MATLAB File Exchange
Seven segment LED display
50 次查看(过去 30 天)
显示 更早的评论
Please help.
Create a graphical interface using a MATLAB program to verify your digital circuit design, which must also satisfy the following programming requirements:
i. You need to allow the user to enter an integer in the range of 0-9 in command window.
ii. Display the corresponding binary inputs (A3, A2, A1, A0) and LED simulation in a MATLAB figure. The LED should display the same integer as the user enters.
iii. The program should have a command for user to exit the program.
0 个评论
回答(1 个)
Vinai Datta Thatiparthi
2020-9-16
Hey!
"Allow the user to enter an integer..." and "...user to exit the program.."
digitToBeDisplayed = input('Enter an integer');
while ~strcmp(digitToBeDisplayed, 'x')
% Rest of the functions come here
end
"Display the corresponding binary inputs..."
"Simulate in a MATLAB figure..."
You could either use a hash-map to decide which LED segments need to be lit up for a given digit, or use a truth table based on the binary representations previously inferred.
You may use different figure properties to display all your information.
For further reference:
Hope this helps!
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Sources 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!