Asked by Oscar Nieto-Cerezo
on 17 Nov 2018

pd=makedist('normal', 'mu', 4.5, 'sigma', 1.25);

rang(1)

h=random(pd, 601,1);

b=5;

c:0.05;

S=1000;

betas=0.5;

betao=0.7;

y=linspace(0, 60, 100);

x=linspace(0, 60, 102);

[X,Y]=meshgrid(x,y);

Z=(sum((S-X+min(b*(max(0,h-6)),Y)-b*(max(0,h-6))).^(1-betao))/(1-betao))/lenght(h)...

+(0.7*sum(((X-(c\2)*6^2-min(b*(max(0,h-6)),Y)).^(1-betas))/(1-betas))/lenght(h)));

[X,Y,Z]=peaks;

contour(X,Y,Z,20)

Opportunities for recent engineering grads.

Apply Today
## 7 Comments

## madhan ravi (view profile)

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/430462-how-can-i-fix-error-matrix-dimensions-must-agree-in-this-code#comment_638815

## Oscar Nieto-Cerezo (view profile)

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/430462-how-can-i-fix-error-matrix-dimensions-must-agree-in-this-code#comment_638888

## per isakson (view profile)

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/430462-how-can-i-fix-error-matrix-dimensions-must-agree-in-this-code#comment_638889

## Walter Roberson (view profile)

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/430462-how-can-i-fix-error-matrix-dimensions-must-agree-in-this-code#comment_638912

## madhan ravi (view profile)

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/430462-how-can-i-fix-error-matrix-dimensions-must-agree-in-this-code#comment_638949

## Oscar Nieto-Cerezo (view profile)

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/430462-how-can-i-fix-error-matrix-dimensions-must-agree-in-this-code#comment_639501

## KSSV (view profile)

## Direct link to this comment

https://au.mathworks.com/matlabcentral/answers/430462-how-can-i-fix-error-matrix-dimensions-must-agree-in-this-code#comment_639505

Sign in to comment.