Write a matlab function that computes precision

Assignment Help Computer Engineering
Reference no: EM132206067

A) Write a MATLAB function that computes precision for a given reference value.

A prototype of the function is given here:

function [precision] = PrecisionVersusBase( base ) % returns precision

The algorithm for computing the precision is given in the pseudo code below

precision = base

WHILE( base + precision > base )

precision = precision / 2

precision = precision * 2

B)

Using the function from part A, compute precision for a reference value equal to 1.0 to 1e-30, reducing it by a factor of 10 each step. ( base = base/10.0; )

Write out the results of each case to a Comma Separated Values (CSV) file*. Write out the precision, and the base, along with the ratio of precision and base, in other words writeout base, precision and precision/base. Document these results in your report.

First, plot the base versus precision and then plot base versus the ratio. Due to the geometricnature in the progression of base, base/10 at each step, a log scale might be helpful.

The MATLAB function loglog is the same as plot, except each axis (x and y) will use a log scale.

Reference no: EM132206067

Questions Cloud

Compute the volume of three different spheres : Write a MATLAB function that computes the volume of 3 different spheres, sphere 1, sphere 2, and sphere 3, and writes them to a txt file Svol.txt.
Compute the solution to the system of equations : The requirement of b as a column vector seems a bit excessive as both row and column vectors are just 1D arrays as far as Matlab is concerned.
Access the data type is called autonumber : In access the data type is called "AutoNumber" in SQLServer it is called an identity field, Oracle is it called a "sequence". What do they do?
Write a matlab program in which you can enter : Write a Matlab program in which you can enter the studentID's of students and then the marks obtained by eac student out of 100.
Write a matlab function that computes precision : Write out the precision, and the base, along with the ratio of precision and base, in other words writeout base, precision and precision/base.
Investigate the botnet attack modules : create many new business opportunities in smart home care, industry automation, and critical infrastructure protection - Evaluation of Botnet Attacks
Write a method that accepts a minimum integer : Write a method that accepts a minimum integer and a maximum and prints a square line of increasing numbers.
Return the range of values in an array of integers : Write a method called range that returns the range of values in an array of integers.
Write a method called reminder that takes an integer : Write method distance to calculate the distance between two points (x1, y1) and (x2, y2). All numbers and return values should be of type double.

Reviews

Write a Review

Computer Engineering Questions & Answers

  What is the main goal of parallel processing

what is the main goal of parallel processing

  Write a compare function that returns 1

The user must be prompted for the values of a and b. The compare function must have arguments for a and b.

  What is the average access time for combined read

It is also estimated that 80% of the memory accesses are for read and 20% for write operations. A cache write-through procedure is used.

  What is the maximum allowable conversion time for the a-d

An A/D convener is required to digitize a I kHz. sinusoidal waveform. What is the maximum allowable conversion time for the A/D?

  What happens to subsequent reads by the first process

In Linux, suppose a process successfully opens an existing file that has a single hard link to it, but while the process is reading that file, another process.

  Construct a linear program consisting of n inequalities

Construct a linear program consisting of N inequalities on two variables for which the simplex algorithm requires at least N /2 pivots.

  A new column would be added to the table

A table was created, Whse.IStock. This table contains a column, SKU that holds stock numbers. The SKU column was created as a data type char(20) and right-justified the stock numbers with leading blanks.

  Sketch an initial use case diagram for data entry

Think about when the different pieces of data might be entered. Sketch an initial use case diagram for data entry.

  Altering the dijkstra’s algorithm

Alter Dijkstra’s algorithm in order to compute the shortest paths from the source vertex s in O(W·|V|+|E|) time.

  Describe the three rudimentary services provide by sms

As part of GSM, describe the three rudimentary services provide by SMS. What is used for transmitting short messages between SMSC and the hand-held device?

  Why is twisted pair wire called twisted pair

Why is twisted pair wire called twisted pair? How does crosstalk occur in twisted pair wire? What are the advantages and disadvantages of shielded twisted pair?

  Explain how you would build your work breakdown structure

If you were managing an agile development project, explain how you would build your work breakdown structure (WBS). Explain the di erences between unit testing and system testing.

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