Skip to content

Instantly share code, notes, and snippets.

@Shogun89
Last active June 28, 2019 17:14
Show Gist options
  • Save Shogun89/615e1945998412ac6924502e85455a8a to your computer and use it in GitHub Desktop.
Save Shogun89/615e1945998412ac6924502e85455a8a to your computer and use it in GitHub Desktop.
% Here are some test values
a=1
b=2
c=3
d=4
% calling the trial function with the test values
result = trial_function(a,b,c,d)
% displaying the result, note that it is disp not print
disp(result)
function your_result = trial_function(a,b,c,d)
A = [0,1;1, a];
B = [0,1;1,b];
C = [0,1;1,c];
D = [0,1;1,d];
% the product of the matrices. Set the return value above: function generic_result = generic_name(args)
your_result = A*B*C*D;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment