Error: Input argument of type 'char'

function [ output_args] = secondary_infections( filename, sheet, xlRange )
%UNTITLED Summary of this function goes here
% Detailed explanation goes here
%IMPORTANT PARAMETERS
g = 0.05; %Per-Capita Death Rate of Mosquitoes
human_mosquitoinf = xlsread( filename, sheet, xlRange); %Reads average daily human to mosquito infectivities into a column vector
secondary_probabilities = zeros(1, size(human_mosquitoinf, 2)); %Vector of zeros. Will contain mapped probabilities for secondary infection.
%FUNCTIONS
mosquito_death = exp(g * X);
%Execution
for i = 1:(size(human_mosquitoinf, 2))
secondary_probabilities(i)= human_mosquitoinf(i)*integral(mosquito_death, i-1, i + 1);
end
filename_final = 'secondary_probabilities.xlsx';
xlswrite(filename_final, secondary_probabilities);
end
I am having difficulty running my code. The purpose of the script is to read in an excel file data, multiply each value of that data by integral(mosquito_death, i-1, i+1) and export this to a new excel file. Unfortunately, when I run it using the command:
secondary_infections('Daily_Infectivities.xlsx','Sheet4','A1001:ADU1001');
I receive the following error:
Undefined function 'secondary_infections' for input arguments of
type 'char'.
Can you please offer me any explanation for this?

Answers (0)

Asked:

on 18 Nov 2014

Commented:

on 18 Nov 2014

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!