'Too many input arguments' Error

I tried to run publicly available code for LHS-PRCC uncertainty and sensitivity analysis on an HIV-ODE model. The code is a collection of 5 files, and Model_LHS.m is the main file.
The code works when the last line is removed (below). When I run the code with the last line, I receive the following error: too many input arguments. Why? The number of inputs in the last line match the number of inputs defined in PRCC.m.
Thank you!
Note: The code is available on http://malthus.micro.med.umich.edu/lab/usadata/. Also, the code is related to the paper A Methodology for Performing Global Uncertainty and Sensitivity Analysis in Systems Biology by Marino et al.
%%The results should be compared to the PRCC results section in
%%Supplementary Material D and Table D.1 for different N (specified by
%%"runs" in the script below
clear all;
close all;
%%Sample size N
runs=100;
%%LHS MATRIX %%
Parameter_settings_LHS;
s_LHS=LHS_Call(1e-2, s, 50, 0 ,runs,'unif'); % baseline = 10
muT_LHS=LHS_Call(1e-4, muT, 0.2, 0 ,runs,'unif'); % baseline = 2e-2
r_LHS=LHS_Call(1e-3, r, 50, 0, runs,'unif'); % baseline = 3e-2
k1_LHS=LHS_Call(1e-7,k1,1e-3, 0 ,runs,'unif'); % baseline = 2.4e-5
k2_LHS=LHS_Call(1e-5, k2, 1e-2, 0, runs,'unif'); % baseline = 3e-3
mub_LHS= LHS_Call(1e-1 , mub , 0.4 , 0 , runs , 'unif'); % baseline = 0.24
N_LHS=LHS_Call(1,N,2e3, 0 ,runs,'unif'); % baseline = 1200
muV_LHS=LHS_Call(1e-1,muV,1e1, 0 ,runs,'unif'); % baseline = 2.4
dummy_LHS=LHS_Call(1,1,1e1, 0 ,runs,'unif'); % dummy parameter
%%LHS MATRIX and PARAMETER LABELS
LHSmatrix=[s_LHS muT_LHS r_LHS k1_LHS k2_LHS ...
mub_LHS N_LHS muV_LHS dummy_LHS];
for x=1:runs %Run solution x times choosing different values
f=@ODE_LHS;
x;
LHSmatrix(x,:);
[t,y]=ode15s(@(t,y)f(t,y,LHSmatrix,x,runs),tspan,y0,[]);
A=[t y]; % [time y]
%%Save the outputs at ALL time points [tspan]
%T_lhs(:,x)=Anew(:,1);
%CD4_lhs(:,x)=Anew(:,2);
%T1_lhs(:,x)=Anew(:,3);
%T2_lhs(:,x)=Anew(:,4);
%V_lhs(:,x)=Anew(:,5);
%%Save only the outputs at the time points of interest [time_points]:
%%MORE EFFICIENT
T_lhs(:,x)=A(time_points+1,1);
CD4_lhs(:,x)=A(time_points+1,2);
T1_lhs(:,x)=A(time_points+1,3);
T2_lhs(:,x)=A(time_points+1,4);
V_lhs(:,x)=A(time_points+1,5);
end
%%Save the workspace
save Model_LHS.mat;
% CALCULATE PRCC
[prcc sign sign_label]=PRCC(LHSmatrix,V_lhs,1:length(time_points),PRCC_var,alpha);

14 Kommentare

Please use
which -all PRCC
to check in case you might have another version of PRCC around.
árbol
árbol am 12 Jan. 2018
@Walter Roberson: Thank you for the response! I am new to MathWorks. What do you mean by use which -all PRCC? Thank you!
Star Strider
Star Strider am 12 Jan. 2018
That which call will return all versions of ‘PRCC’, including variables by that name, in your MATLAB search path.
Walter Roberson
Walter Roberson am 12 Jan. 2018
Type that command at the MATLAB command line. It will tell you which file it is finding for PRCC, which might not be the one you are expecting.
@Star Strider and @Walter Roberson: Thank you for the responses. I typed the command at the MATLAB command line. MATLAB is finding the correct file for PRCC.
I cleared my workspace and ran the code again. The code ran, but I received the following error:
Error using alpha
Too many output arguments.
Error in Model_LHS (line 52)
[prcc sign sign_label]=PRCC(LHSmatrix,V_lhs,1:length(time_points),PRCC_var,alpha);
Is this because alpha is not defined?
Walter Roberson
Walter Roberson am 12 Jan. 2018
You did not assign a value to alpha, which just happens to be the name of a function call that cannot return outputs. You need to assign a value to alpha
árbol
árbol am 10 Mär. 2018
The code worked once I assigned a value to alpha. Thank you!
Sindikubwabo Jean Dama
Sindikubwabo Jean Dama am 24 Apr. 2018
@Star Strider, @Walter Roberson and @A. Kachalia Me also I'm new in Mathwork and I'm doing sensitivity analysis on Malaria, I Want to learn more about PRCC ,Still now I Want to know how to find Y(s,:) having Reproduction number® And LHSmatrix.
Cristian Camilo Espitia Morillo
Bearbeitet: Cristian Camilo Espitia Morillo am 25 Mai 2020
In the code line:
[prcc sign sign_label]=PRCC(LHSmatrix,V_lhs,1:length(time_points),PRCC_var,alpha);
Could someone tell me what alpha represents? What should be the most appropriate value?
Thanks
Walter Roberson
Walter Roberson am 25 Mai 2020
Good question. Unfortunately the documentation for that code could use improvement. I looked at the source, but there is no description of most of the parameters.
Eric Okyere
Eric Okyere am 29 Jul. 2020
set alpha to be 0.05
sumit kumar
sumit kumar am 25 Aug. 2022
@Eric Okyere, @Walter Roberson, @Star Strider I have used (alpha = 0.05)
[prcc sign sign_label]=PRCC(LHSmatrix,V_lhs,1:length(time_points),PRCC_var,0.05);
still i got the following error
Error using horzcat
Dimensions of arrays being concatenated are not consistent.
Error in PRCC (line 24)
[rho,p]=partialcorr(eval(c1),eval(c2),'type','Spearman');
Error in Model_LHS (line 52)
[prcc sign sign_label]=PRCC(LHSmatrix,V_lhs,1:length(time_points),PRCC_var,0.05);
Can you please tell me where i am going wrong
Walter Roberson
Walter Roberson am 25 Aug. 2022
Your first parameter LHSmatrix and your second parameter V_lhs must have the same number of rows
sumit kumar
sumit kumar am 25 Aug. 2022
Thank you so much @Walter Roberson. It helped..

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Gefragt:

am 12 Jan. 2018

Kommentiert:

am 25 Aug. 2022

Community Treasure Hunt

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

Start Hunting!

Translated by