Hello,
The error arises because the dimensions of the "outVAR" array do not align with the indices used in the "squeeze" function, causing mismatched vector lengths.
"wstar" (weight index) and "qq" (quantile index) are incorrectly applied to the copula model dimension (second dimension of "outVAR"), leading to a dimension mismatch when plotting.
To fix this, adjust the indexing to correctly reference the copula model dimension (1 or 2) and the weight/quantile indices. For example, replace "squeeze(outVAR(:,wstar,qq,1,1))" with "squeeze(outVAR(:,1,wstar,qq,1,1))" for the first copula model (RotGumbel) and "squeeze(outVAR(:,2,wstar,qq,1,1))" for the second (Stud t). Ensure all dimensions align.
Verify the dimensions of "outVAR" using "size(outVAR)" and confirm "wstar" and "qq" are valid indices for the weight and quantile dimensions.
I hope this helps.