Write a basic matlab code that allows the user to play

Assignment Help Electrical Engineering
Reference no: EM13273578

write a basic MatLab code that allows the user to play against the computer in a game of battleship. All the script needs to do is make a two 10 by 10 grids, one for the user, one for the computer. Allow the user to choose where to place their ships, and in which direction. Then have the computer randomly place its ships.

Reference no: EM13273578

Questions Cloud

Explain chromatographic analysis : A solution containing 3.45 mM of p-xylene (analyte) and 6.86 mM of nonane (standard) gave peak areas of 13587 and 14769 respectively, in a chromatographic analysis. then 1.5 mL of 6.86mM nonane solution was added to 5 mL of an unknown sample conta..
What is the amplitude of the current : A charged capacitor is connected to an ideal inductor. At time t = 0, the charge on the capacitor is equal to 6.00 µC. What is the amplitude of the current at that same instant
Calculate the option profit to the trader : At the expiration, the stock price becomes $18.99. Calculate the option profit to the trader.
What is the value of an fra : The 12-month, 15-month, 18-month zero rates are 4.5%, 4.6%, 4.7% with continuous compounding. What is the value of an FRA that enables the holder to earn 6.1% (with semiannual compounding) for a 3-month period starting in 1 year on a principal of ..
Write a basic matlab code that allows the user to play : All the script needs to do is make a two 10 by 10 grids, one for the user, one for the computer. Allow the user to choose where to place their ships, and in which direction. Then have the computer randomly place its ships.
Describe compound y contains only carbon and hydrogen : Compound Y contains only carbon, hydrogen, and oxygen. When a 1.000-gram sample of Compound Y is subjected to combustion analysis, 2.432 grams of CO2 and 0.574 grams of H2O are produced. Determine the empirical formula of Compound Y.
What is the net cash flow of the swap contract : Suppose the 6-m LIBOR rates were 5.7% on 6/1/2013 and 6% on 12/1/2013. What is the net cash flow of the swap contract on 12/1/2013?
Explain the importance of the house of refuge : Explain the importance of the House of Refuge, The Lyman School for Boys, and the Cottage Reform School.
Determine all minimum sum of products expressions : find all minimum sum of products expressions. ( if there is more than one solution ,the number of solutions is given in parentheses.) label the solutions f1,f2.... a) f(w,x,y,z)= Σm(1,3,6,8,11,14)+Σd(2,4,5,13,15)

Reviews

Write a Review

Electrical Engineering Questions & Answers

  Calculate the spatial part of e at a point r

Two short antennas each of length 10cm at the origin carry identical currents of I = 5 Sin (wt). One is in the az direction and the other one is in the ay direction. If the frequency of the antenna is 60 MHz then calculate

  Find the marginal pdfs and joint cdf

The amplitudes of two signals X and Y have joint pdf: fXY (x,y) = e^(-x/2)*y*e^(-y^2) for x>0 , y>0. (a) Find the joint CDF (b) Find P [sqrt(x) > y] (c) Find the marginal PDFs (d) Determine if X and Y are independent.

  Explain can three of the doublers be interconnected

a) Design the doubler circuit shown in Figure 2, for which:D = d8 d4 d2 d1 and B = b8 b4 b2 b1  are each an 8421 BCD code digit. The circuit must implement the equation: 10C* + B = 2D + C

  Fdtd evaluation of the sar distribution

Finite Difference Time Domain (FDTD) numerical method to develop for me a software program that simulates - evaluates Specific Absorption Rate (SAR) Distribution in a Human Head Near a Mobile Cellular Phone as a student project.

  How much time is required to transmit 10 characters

The HCS112 SPI is configured for 6 Mbaud. Assuming that it takes 1 microsecond to load each character, how much time is required to transmit 10 characters

  Compare the capacitance per unit length of cases

Capacitance can be altered by immersing part of the two wire line into a different medium. (a) What is the capaccitance per unit length in F/m of the transmission lines. You must explain your reasoning and show the equation you used.

  Give five floating-point random numbers per line

Write a program that generates 50 floating-point random numbers in a range from 0 to 10,000 using different seed values. Five floating-point random numbers per line are required to be displayed on the ouput.

  Determine the power and torque developed by the motor

A dc series motor of 230 V, 12 hp, 1200 rpm is connected to a 230 V supply. It draws a current of 40 A, and rotates at 1200 rpm. Ra = 0.25 ohms and Rs = 0.1 ohms. Assume magnetic linearity.

  Find the total charge within the sphere

A spherical region defined by 0

  What is the reverse saturation current density

An ideal p-n junction diode is reverse biased with a voltage of 30 mV. If the reverse current at this voltage is 1 pA and the area of the diode is 100 µm x 100 µm, what is the reverse saturation current density, JS

  Find the photon round-trip time in the resonator

The length of GaAs laser resonator is L = 165 um; the width and the thickness are W = 10 um and d = 0.1 um. Find the photon round-trip time in this resonator. The refractive index of GaAs is 3.7.

  Determine what is the largest possible range of wavelengths

A long-haul optical transmission link is to be designed under the design constraints that (i) the radius of the core is to be no smaller than 4 ?m, and (ii) a numerical aperture (NA) of at least 0.12 is needed to focus optical energy into the fibe..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd