Normal distribution function in Matlab
5 views (last 30 days)
Show older comments
JACINTA ONWUKA on 20 Nov 2020
Commented: Star Strider on 20 Nov 2020
p was changed to a normal and is giving me the error "Matrix dimensions must agree." in tau.
p = normrnd(0.0001,0.0001,[1,10])
tau = (1/(beta*(L+delta*p)))*log((L*(I1+delta*p))/(delta*p*(L-I1)))
I2= (L*delta*p*(exp (beta*(L+delta*p)*t1)-1)) ./ (L + delta*p* exp(beta*(L+delta*p)*t1));
I3= (L* (I1+delta*p)*exp((epsilon*beta)*(L+delta*p)*(t2-tau))-...
Use element-wise operations on every multiplication, division (and exponentiation, although not used here).
tau = (1./(beta.*(L+delta.*p))).*log((L.*(I1+delta.*p))./(delta.*p.*(L-I1)));
See Array vs. Matrix Operations for details.
Provide all scalar inputs to linspace.
t1=linspace(0, max(tau), numel(tau));
t2=linspace(min(tau), max(tau), tend);
These are obviously just guesses.
I have no idea what you are doing, so make appropriate changes to get the result you want.
More Answers (0)
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!