When I try to run a function that needs constants defined in a struct outside of it, it give the error "Not enough input arguments.". How can I give as input in the function the data struct?
data.accumulator.V_N2 = 10e-3;
data.accumulator.P_N2 = 2.5e6;
data.accumulator.p0 = 21e6;
data.accumulator.gamma = 1.2;
function dydt = problem(t,y,data)
A23 = (data.delivery.D23^2/4)*pi;
This is just an example with some line of codes, I get an error on A23, not enough input arguments. I suspect the function doesnt know what data.delivery.D23 is even if its written outside, how can I pass the data structure in the function?