Question: confused on how to do this please help a) Modify the code from Task 1 (copied below) so that the calculation is repeated 500 times.

confused on how to do this please help
confused on how to do this please help a) Modify the code

a) Modify the code from Task 1 (copied below) so that the calculation is repeated 500 times. Save the number of spin-up electrons computed each time the calculation is repeated in a vector called trials. Hint, you will need to create another loop for the number of times you want to run the code and should end up with a vector called trials of length 500. N_elec = 100; N_up = 0; p=0.5; for h = 1:N_elec x=rand; if x

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!