Question

In: Mechanical Engineering

1. (USE MATLAB) Create a table using fprintf that shows the conversion from US Dollars to...

1. (USE MATLAB) Create a table using fprintf that shows the conversion from US Dollars to Yen, Euros, Mexican Peso, and Canadian Dollars. Use the internet to find the conversion factors. Prompt the user for the US Dollar amounts they want to see conversions for.

Solutions

Expert Solution

MATLAB CODE:

clear all
clc
US_dollars       = input("Enter amount value in US dollars");
Yen              = US_dollars*106.84;
Euro             = US_dollars*0.86;
Mexican_pesos    = US_dollars*22.49;
Canadian_dollars = US_dollars*0.75;

fprintf('Table of US dollar in different currencies\n')
fprintf('US dollars\t Yen\t Euro\t Mexican Peso\t Canadian dollars\n')
fprintf(' %0.2f\t    %0.2f\t %0.2f\t  %0.2f\t  %0.2f\n',[US_dollars;Yen;Euro;Mexican_pesos;Canadian_dollars])


Related Solutions

7-2) The following table shows the bail bond (in US dollars) a sample of arrested men...
7-2) The following table shows the bail bond (in US dollars) a sample of arrested men and women had to pay to get out of jail. men women 1000 500 300 250 1500 250 200 200 500 500 150 250 1000 100 500 150 1200 250 Formulate the null hypothesis stating no gender difference in the bail bond the arrestees have to pay Formulate the alternative hypothesis Using the independent-sample t test, test the null hypothesis [H0] List the value...
Create a table in C of conversion from Celsius to Rankin. Allow the user to enter...
Create a table in C of conversion from Celsius to Rankin. Allow the user to enter the starting temperature and increment between lines. Print 25 lines in the table. Rankin = 9/5(Celsius + 273.15)
This data shows the series of quarterly shipments in millions of US dollars of US hosehold...
This data shows the series of quarterly shipments in millions of US dollars of US hosehold appliances between 1985 and 1989. Quarter Shipments Q1-1985 4009 Q1-1986 4123 Q1-1987 4493 Q1-1988 4595 Q1-1989 4245 Q2-1985 4321 Q2-1986 4522 Q2-1987 4806 Q2-1988 4799 Q2-1989 4900 Q3-1985 4224 Q3-1986 4657 Q3-1987 4551 Q3-1988 4417 Q3-1989 4585 Q4-1985 3944 Q4-1986 4030 Q4-1987 4485 Q4-1988 4258 Q4-1989 4533 (a) which of the following methods would be suitable for forecasting this series if applied to raw...
USING MATLAB: Using the data from table below fit a fourth-order polynomial to the data, but...
USING MATLAB: Using the data from table below fit a fourth-order polynomial to the data, but use a label for the year starting at 1 instead of 1872. Plot the data and the fourth-order polynomial estimate you found, with appropriate labels. What values of coefficients did your program find? What is the LMS loss function value for your model on the data? Year Built SalePrice 1885 122500 1890 240000 1900 150000 1910 125500 1912 159900 1915 149500 1920 100000 1921...
The table shows the prices (in dollars) for a sample of automobile batteries. The prices are...
The table shows the prices (in dollars) for a sample of automobile batteries. The prices are classified according to battery type. At α = .05α = .05α = .05, is there enough evidence to conclude that at least one mean battery price is different from the others? (Assume the samples are random and independent, the populations are normally distributed, and the population variances are equal) Battery Type A 110 100 125 90 120 Battery Type B 280 145 180 175...
a. Using Matlab scripts create the following matrices (???1 and ???2) ???1 = [ 3 2...
a. Using Matlab scripts create the following matrices (???1 and ???2) ???1 = [ 3 2 −3 6 7 4 3 −6 7 ], ???2 = [ 2 1 7 3 3 9 −6 6 1 ]    b. Write code to add the second row of ???1 to the third row of ???2 and store results in the first row of ???1. c. Write code to add the second column of ???1 with the third column of ???2 and...
The table shows the US presidential election results:                                  &n
The table shows the US presidential election results:                                                           Popular Vote               Electoral Vote ………………………………………………………………………………………………………………….. Clint Smith                                          69,984,625                              267 ……………………………………………………………………………………………………………………. Don Kruger                                         65,853,516                              271 Who will be the next president? and why?
Amount Spent on Energy: The table to the right shows the amount spent (in dollars) on...
Amount Spent on Energy: The table to the right shows the amount spent (in dollars) on energy in one year for a random sample of households from four regions in the United States. Conduct a test at the alpha equal .05 level to determine if there is a difference in the mean amount spent in dollars on energy Run the ANOVA analysis using excel data analysis tools on this sheet to show the work. Answer the following questions on the...
The accompanying table shows the annual​ salaries, in thousands of​ dollars, earned by a sample of...
The accompanying table shows the annual​ salaries, in thousands of​ dollars, earned by a sample of individuals who graduated with MBAs in the years 2012 and 2013. Perform a hypothesis test using α equals= 0.05 to determine if the median salary for 2012 MBA graduates is lower than 2013 MBA graduates. Salaries​ (in thousands of​ dollars) for 2012 MBA graduates 92.6 66.1 60.6 85.5 92.8 44.7 84.4 81.1 44.2 94.3 66.6 61.6 94.6 81.6 Salaries​ (in thousands of​ dollars) for...
The table to the right shows the cost per ounce​ (in dollars) for a random sample...
The table to the right shows the cost per ounce​ (in dollars) for a random sample of toothpastes exhibiting very good stain​ removal, good stain​ removal, and fair stain removal. At alpha=0.05​, can you conclude that the mean costs per ounce are​ different? Perform a​ one-way ANOVA test by completing parts a through d. Assume that each sample is drawn from a normal​ population, that the samples are independent of each​ other, and that the populations have the same variances....
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT