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?
댓글 수: 1
Guillaume
2014년 11월 18일
What does
which secondary_infections
return?
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 String Parsing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!