To evaluate the percentage difference between a previous and a new result in matlab, you can use the following formula:
main.m68 chars2 lines
where new_result
is the new result and prev_result
is the previous result. The abs
function is used to take the absolute value of the percentage difference.
Here's an example code:
main.m138 chars7 lines
In this example, the previous result is 50 and the new result is 75. The percentage difference between these two values is calculated to be 50.
gistlibby LogSnag