Learning Objectives Learn how to write correct and reliable Matlab code Learn how to debug Matlab code. ME 2016: Computing Techniques. Designing and Debugging Matlab Code Understand The Matlab graphical Debugger Defensive coding practice Error trapping. How to Design a Program?.
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
Learn how to write correct and reliable Matlab code
Learn how to debug Matlab code
Exit debug mode
BreakpointDebugging - Using the Graphical Debugger
Warning: the code above contains bugs!
if gear_ratio == 0
error('The gear_ratio should be non-zero.');
gear_ratio = 0; % for illustration purposes only…
load_torque = load_torque (rpm, gear_ratio, slope);
fprintf('Something went wrong while computing the load torque');
load_torque = 0;