Question
Greetings everyone


I need of your help. Converting this basic code into matlab code in order to complete the table below please. Thank you. I will give a good rating
100 J1 110 N = N + 1 120 IF RND > N/365 THEN 110 130 MM+N+1 140 PRINT J, N +1, M/3 150 N- 0 160 JJ 1 170 GOTO 110 Before running the simulation, estimate the long-run average here: Number Questioned in this Experiment Average Number Questioned per Experiment Experiment 4 10 25 50 100 1000 10000
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Code in Matlab

N = 0
J = 1
M=0
while(1)
N = N+1
while rand()>N/365
N =N+1
end
M = M + N + 1
disp(J)
disp(N + 1)
disp(M/J)
N =0
J = J + 1
end

According to loop this will be indefinite loop

Add a comment
Know the answer?
Add Answer to:
Greetings everyone I need of your help. Converting this basic code into matlab code in order...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Directly compare your own GCMS data to the three different stock GCMS data sets. CIGC Yukki...

    Directly compare your own GCMS data to the three different stock GCMS data sets. CIGC Yukki 7 10000 3.488 Spoctrum 102030405060为80 90 100 110 120 10 140 150 160 170 180 190 Spectrum Peak Repet TIC Area Ast 28a86 100 4.118 Page 1 of 3 10 20 30 40 60 Prak Repon TIC Are Anat 2 4117 Page 2 of 3 TIC 1.00 min Spectnan 0 10 20 0 70300 10 120 140 150 160 170 10 190 Spectrum 0...

  • QUESTION 1 VC 260 What is the MC of the second unit? O a. 27.5 b....

    QUESTION 1 VC 260 What is the MC of the second unit? O a. 27.5 b. 20 O c. 30 d. 25 QUESTION 2 AVC BIRI 25 II 260 What is the MC of the 5th unit? 0 a 40 b. 30 C. 50 d. 60 QUESTION 3 TIH M 11 260 How large are the fixed costs? a. 100 b. 180 c. 120 d. 150 QUESTION 4 Suppose that marginal cost and average total cost for the typical firm...

  • i need help interpreting this for my unknown! please help. All I know is that it...

    i need help interpreting this for my unknown! please help. All I know is that it is a liquid amine, with boiling point 190-193 celcius. Unknown Determination 26,919,406 10.0 10 Peak R. Time 3.503 Peak Report TIC Area 82229865 82229865 Area% 100.00 100.00 50 60 30 90 100 110 120 130 140 150 160 170 180 CDC3 QE 300

  • Math 125: May 18, 2018 To get full credit you must show your work. No work,...

    Math 125: May 18, 2018 To get full credit you must show your work. No work, no credit. Each question is worth about 9 points. 1. The figure below is a histogram showing the distribution of blood pressure for about 14,000 women in a drug study. Use the histogram to answer the following questions: (a) Is the percentage of women with blood pressures between 90 mm and 160 mm around 1%, 50%, or 99%? (b) In which interval are there...

  • What is the molecular structure? 2 4 CHAPTER 8 ASSIGNED PROBLEMS Problem 8.43A MASS I 20...

    What is the molecular structure? 2 4 CHAPTER 8 ASSIGNED PROBLEMS Problem 8.43A MASS I 20 sen par 43 100 131 85 109 95 1827 ? 185 50 200 50 100 150 200 m/z IR 100 90 E 70 4000 3000 2000 1000 Wavenumber (cm-1) 'H NMR 600 MHz 1260 1240 Hz 780 760 740 Hz 4.5 4.0 3.5 3.0 2.5 2.0 1.5 Ppm 1C/DEPT NMR 150.9 MHz 170 160 150 140 130 120 110 100 90 80 70 60...

  • Use the following wave spectrum to identify the chemical structure Problem 11.10 60 40 Exact M.S. (CI) 129.1279 FT-...

    Use the following wave spectrum to identify the chemical structure Problem 11.10 60 40 Exact M.S. (CI) 129.1279 FT-IR (NEAT) 20 UVAmax BLANK 4000 3000 2000 800 WAVENUMBERS (CM) 1200 1000 100. Mass Spec. CI 70eV 60 55 40 43 129 20 40 60 70 80 100 110 120 40 m/s 13C NMR 62.3 MHz COCI CDCI luuluuluu 50 40 30 20 10 120 S00 70 130 160 150 140 170 H 500 MHz 3H CDCla 5.2 Hz/mm H 10H...

  • Can someone help me figure out the formulas or how to graph, I'm really confused I...

    Can someone help me figure out the formulas or how to graph, I'm really confused I took Microeconomics online it was a huge mistake I'm falling behind ever week. Thank you in advance, I appreaciate any homework help you can give me. UUU IVIL AFC TVC AVC TC ATC MC Q TFC 1200 200 VC 120 100 85 190... 180... 170.... 160..... 150... 140 130.... .120..... 110... SHA. 1009 60 95 110 125 19 20 140 155 1 2 3...

  • given code: assignment: use python to extend the given code to create an output similar to...

    given code: assignment: use python to extend the given code to create an output similar to the one in the black box please explain the final code import random HALMst N in = int(input('Enter Total Number of Cards: ") NM in NOON A = [] B [] E - [] D = [] E = [] for i in range(1, n+1): A.append(i) D.append(i) E.append(i) for j in range(n): 8.append(random.choice(D)) D.remove(B[5]) C.append(random.choice(E)) E.remove(C[j]) c= 0 for k in range(n): if (Brkl...cikl):...

  • Can somone show me how to do the 1st problem? Need to find the LS and...

    Can somone show me how to do the 1st problem? Need to find the LS and SS for the fit and the LH and SH for the hole. Fits are all SHAFT BASIS METRIC but the shaft and hole diameters can not be used right out of the table. This is because the 3mm shaft tolerance does not match. You will need to lookup the "Fit" from the table, and then use the LS (Largest Shaft) and SS (Smallest Shaft)...

  • Will rate!! Show good work plz! Only need help on problems that do NOT involve R...

    Will rate!! Show good work plz! Only need help on problems that do NOT involve R simulation Part 3. (13 points) Simulation of Gamma Random Variables Background: When we use the probability density function to find probabilities for a random variable, we are using the density function as a model. This is a smooth curve, based on the shape of observed outcomes for the random variable. The observed distribution will be rough and may not follow the model exactly. The...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT