



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Outline Feb 28 Material Type: Notes; Professor: Sawicki; Class: Computer Methods in Biomedical Engineering; Subject: Biomedical Engineering; University: North Carolina State University; Term: Spring 2011;
Typology: Study notes
1 / 5
This page cannot be seen from the preview
Don't miss anything!




%define three variables a=4, b=3, c=7; %call function that takes 3 variables and returns 3 variables. [d, e, f] = computeThis1(a, b, c);
function [x, y, z] = computeThis2(x, y, z) % a simple function that takes 3 input values, % and returns the same 3 values that may or may not have been updated in %the function body. This is the parent/primary function. if x==y %use == to compare for equivalence y = z x = x^2; elseif x < y %less than y = x+1; else %if previous statements are false... [x, y, z]= subElse(x, y, z) end % terminate code block end % terminate parent function %A subfunction that can only be used by functions in this file function [l, m, n] = subElse(l, m, n) m = l^2; l = n; end