'Too many input arguments' Error
Mostrar comentarios más antiguos
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 comentarios
Walter Roberson
el 12 de En. de 2018
Please use
which -all PRCC
to check in case you might have another version of PRCC around.
árbol
el 12 de En. de 2018
Star Strider
el 12 de En. de 2018
That which call will return all versions of ‘PRCC’, including variables by that name, in your MATLAB search path.
Walter Roberson
el 12 de En. de 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.
árbol
el 12 de En. de 2018
Walter Roberson
el 12 de En. de 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
el 10 de Mzo. de 2018
Sindikubwabo Jean Dama
el 24 de Abr. de 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
el 25 de Mayo de 2020
Editada: Cristian Camilo Espitia Morillo
el 25 de Mayo de 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
el 25 de Mayo de 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
el 29 de Jul. de 2020
set alpha to be 0.05
sumit kumar
el 25 de Ag. de 2022
[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
el 25 de Ag. de 2022
Your first parameter LHSmatrix and your second parameter V_lhs must have the same number of rows
sumit kumar
el 25 de Ag. de 2022
Respuestas (0)
Categorías
Más información sobre Creating and Concatenating Matrices en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!