Storing values from a loop in a function in Matlab
I am writing a function in Matlab to model the length of stay in hospital of stroke patients. I am having difficulty in storing my output values. Here is my function: function [] = losdf(age, strokeType, dest) % function to mdetermine length of stay in hospitaal of stroke patients % t = time since admission (days); % age = age of patient; % strokeType = 1. Haemorhagic, 2. Cerebral Infarction, 3. TIA; % dest = 5.Death 6.Nursing Home 7. Usual Residence; alpha1 = 6.63570; beta1 = -0.03652; alpha2 = -3.06931; beta2 = 0.07153; theta0 = -8.66118; theta1 = 0.08801; mu1 = 22.10156; mu2 = 2.48820; mu3