05 May 2018 1 8K Report

function Y = myFunction(d,n,theta)

Y = coinflip(100,100,0.25);

d = 100;

n = 100;

theta = 0.25;

Y = [ ];

for Dloop = 1:d

for Nloop = 1:n

X =randn(1);

Y = [Y;X];

end

end

Y(Ytheta) = 1;

histogram(Y)

(I get some errors as below -)

function Y = myFunction(d,n,theta)

Error: Function definition not supported in this context. Create functions in code file.

(another error is as below)

Error in myFunction (line 2)

Y = coinflip(100,100,0.25);

(other error is as below)

Y = coinflip(100,100,0.25);

Undefined function or variable 'coinflip'.

Please help me to modify the errors and

able to produce one correct output graph

More Tcy Tcy's questions See All
Similar questions and discussions