MATLAB
1. Introduce some if-statements into your energy.m code by considering the following items:
When you are done with the above mentioned steps, then create a larger if-statement, giving the option to the user to select either Metric or US customary units. Ask the user which unit system they want to work in. Hint: Copy and paste what you have for two units and just change the appropriate units. For one, the user enters mass in Kg, for other one, they enter Slug.
This code can have so many other things (such as weeding out the texts and matrices that the user might enter by mistake), but we would like to make it simple for now. For this assignment, you will have at least one small if- statement (scalar-vector choices) inside the larger if-statement (unit choices).
HERE IS THE ENERGY.M FILE CODE:
function[E]=energy
% This program accepts a vector of masses and calculates the energy
for
% them. It displays a linear and three logarithmic plots and
provides a
% table of values for mass entered and resulting energy from the
row vector
% entered.
%
clc
close all
help energy
c=2.9979e8;
m=input('Please enter a vector of masses in Kg=');
E=m*c^2;
subplot(2,2,1)
plot(m,E,'b-p')
xlabel('MASS (kg)')
ylabel('ENERGY (J)')
title('E vs m-NORMAL')
grid
subplot(2,2,2)
semilogx(m,E,'m-p')
xlabel('MASS (kg) IN LOG SCALE')
ylabel('ENERGY (J)')
title('E vs m-SEMILOGX')
grid
subplot(2,2,3)
semilogy(m,E,'r-p')
xlabel('MASS (kg)')
ylabel('ENERGY (J) IN LOG SCALE')
title('E vs m-SEMILOGY')
grid
subplot(2,2,4)
loglog(m,E,'g-p')
xlabel('MASS (kg) IN LOG SCALE')
ylabel('ENERGY (J) IN LOG SCALE')
title('E vs m-LOGLOG')
grid
filename = 'energy.xlsx';
A = {'Mass (kg)';'Energy (J)'};
xlswrite('energy.xlsx', A, 1, 'A1');
xlswrite('energy.xlsx', [m; E], 1, 'B1');
end
In: Computer Science
I need this in pseudocode:
Similar to the previous assignment, you’re going to read in the number of years the player played and the starting year of that player – followed by the statistics for those years. This time, however, you’re going to print out the years from worst to best in sorted order. Hint: this will require a second array to store years. If you can sort one array, can you sort both? Sample Output #1: Enter the number of years: 5
Enter the starting year: 2003
Enter stat for year 2003: 5
Enter stat for year 2004: 4
Enter stat for year 2005: 7
Enter stat for year 2006: 1
Enter stat for year 2007: 3
2006|2007|2004|2003|2005|
Sample Output #2: Enter the number of years: 6
Enter the starting year: 1879
Enter stat for year 1879: 70
Enter stat for year 1880: 89
Enter stat for year 1881: 111
Enter stat for year 1882: 65
Enter stat for year 1883: 105
Enter stat for year 1884: 98
1882|1879|1880|1884|1883|1881|
In: Computer Science
otorua Products, Ltd., of New Zealand markets agricultural products for the burgeoning Asian consumer market. The company’s current assets, current liabilities, and sales over the last five years (Year 5 is the most recent year) are as follows:
| Year 1 | Year 2 | Year 3 | Year 4 | Year 5 | |||||||||||
| Sales | $ | 1,800,000 | $ | 1,980,000 | $ | 2,070,000 | $ | 2,160,000 | $ | 2,250,000 | |||||
| Cash | $ | 50,000 | $ | 65,000 | $ | 48,000 | $ | 40,000 | $ | 30,000 | |||||
| Accounts receivable, net | 300,000 | 345,000 | 405,000 | 510,000 | 570,000 | ||||||||||
| Inventory | 600,000 | 660,000 | 690,000 | 720,000 | 750,000 | ||||||||||
| Total current assets | $ | 950,000 | $ | 1,070,000 | $ | 1,143,000 | $ | 1,270,000 | $ | 1,350,000 | |||||
| Current liabilities | $ | 400,000 | $ | 440,000 | $ | 520,000 | $ | 580,000 | $ | 640,000 | |||||
Required:
1. Express all of the asset, liability, and sales data in trend percentages. Use Year 1 as the base year. (Round your percentage answers to 1 decimal place (i.e., 0.1234 should be entered as 12.3).)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
In: Accounting
Rotorua Products, Ltd., of New Zealand markets agricultural products for the burgeoning Asian consumer market. The company’s current assets, current liabilities, and sales over the last five years (Year 5 is the most recent year) are as follows:
| Year 1 | Year 2 | Year 3 | Year 4 | Year 5 | |||||||||||
| Sales | $ | 4,504,310 | $ | 4,838,440 | $ | 5,003,570 | $ | 5,532,780 | $ | 5,644,610 | |||||
| Cash | $ | 87,574 | $ | 96,953 | $ | 86,589 | $ | 88,508 | $ | 80,997 | |||||
| Accounts receivable, net | 418,154 | 435,330 | 443,074 | 510,098 | 562,711 | ||||||||||
| Inventory | 815,081 | 875,927 | 827,874 | 886,671 | 896,947 | ||||||||||
| Total current assets | $ | 1,320,809 | $ | 1,408,210 | $ | 1,357,537 | $ | 1,485,277 | $ | 1,540,655 | |||||
| Current liabilities | $ | 304,021 | $ | 348,173 | $ | 335,191 | $ | 331,789 | $ | 392,706 | |||||
Required:
1. Express all of the asset, liability, and sales data in trend percentages. Use Year 1 as the base year. (Round your percentage answers to 1 decimal place (i.e., 0.1234 should be entered as 12.3).)
| Year 1 | Year 2 | Year 3 | Year 4 | Year 5 | |
| Sales | % | % | % | % | % |
| Current Assets: | |||||
| Cash | % | % | % | % | % |
| Accounts Recievable | % | % | % | % | % |
| Inventory | % | % | % | % | % |
| Total Current Assets | % | % | % | % | % |
| Current Liabilities | % | % | % | % | % |
In: Accounting
ch 13 excersises #7
|
Rotorua Products, Ltd., of New Zealand markets agricultural products for the burgeoning Asian consumer market. The company’s current assets, current liabilities, and sales have been reported as follows over the last five years (Year 5 is the most recent year): |
| Year 1 | Year 2 | Year 3 | Year 4 | Year 5 | |||||||||||
| Sales | $ | 4,580,860 | $ | 4,735,820 | $ | 5,001,620 | $ | 5,420,060 | $ | 5,639,850 | |||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Cash | $ | 81,352 | $ | 106,124 | $ | 97,984 | $ | 79,072 | $ | 71,100 | |||||
| Accounts receivable, net | 407,133 | 423,048 | 433,744 | 508,219 | 571,089 | ||||||||||
| Inventory | 815,295 | 879,304 | 829,713 | 890,118 | 898,221 | ||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Total current assets | $ | 1,303,780 | $ | 1,408,476 | $ | 1,361,441 | $ | 1,477,409 | $ | 1,540,410 | |||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Current liabilities | $ | 303,570 | $ | 337,709 | $ | 333,736 | $ | 331,732 | $ | 407,200 | |||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|||||||||||||||
| Required: | |
| 1. |
Express all of the asset, liability, and sales data in trend percentages. Use Year 1 as the base year. (Round your percentage answers to 1 decimal place (i.e., 0.1234 should be entered as 12.3).) |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
In: Accounting
Rotorua Products, Ltd., of New Zealand markets agricultural products for the burgeoning Asian consumer market. The company’s current assets, current liabilities, and sales have been reported as follows over the last five years (Year 5 is the most recent year):
| Year 1 | Year 2 | Year 3 | Year 4 | Year 5 | |||||||||||
| Sales | $ | 4,515,380 | $ | 4,822,420 | $ | 5,076,200 | $ | 5,452,070 | $ | 5,729,200 | |||||
| Cash | $ | 86,992 | $ | 95,104 | $ | 103,580 | $ | 80,327 | $ | 75,778 | |||||
| Accounts receivable, net | 417,549 | 422,756 | 446,624 | 501,647 | 562,728 | ||||||||||
| Inventory | 809,884 | 874,064 | 831,041 | 886,589 | 905,481 | ||||||||||
| Total current assets | $ | 1,314,425 | $ | 1,391,924 | $ | 1,381,245 | $ | 1,468,563 | $ | 1,543,987 | |||||
| Current liabilities | $ | 311,618 | $ | 339,904 | $ | 336,411 | $ | 337,589 | $ | 401,849 | |||||
| Required: | |
| 1. |
Express all of the asset, liability, and sales data in trend percentages. Use Year 1 as the base year. (Round your percentage answers to 1 decimal place (i.e., 0.1234 should be entered as 12.3).) |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
In: Accounting
Variable Costing and Over/Under Producing
Cathy's Mats produces and sells artistic placemats for dining room
tables. These placemats are manufactured out of recycled plastics.
For last year and this year each mat has a variable manufacturing
cost of $3, and fixed manufacturing overhead is $150,000 per year
(both Last Year and This Year). Cathy's Mats incurs no other costs.
The following table summarizes the selling price and the number of
mats produced and sold Last Year and This Year:
|
Last Year |
This Year |
|||
|
Selling price |
$ |
4.00 |
$ |
4.00 |
|
Variable manufacturing cost |
$ |
2.00 |
$ |
2.00 |
|
Fixed manufacturing cost |
$ |
130,000 |
$ |
130,000 |
|
Units produced |
140,000 |
40,000 |
||
|
Units sold |
110,000 |
50,000 |
||
Cathy's Mats uses FIFO (First-in First Out) to value its ending
inventory. Last Year Cathy's Mats had no beginning inventory.
Required:
a. Prepare income statements for Last Year and This Year using
absorption costing.
b. Prepare income statements for Last Year and This Year using
variable costing.
c. What is the value of the ending inventory using the FIFO method?
d. What is the value of the ending inventory using the LIFO method?
In: Accounting
Problem 1 (In order to get credit, show your work and you can
copy the tables below into the answer box to fill in.)
Sugar Land Company is considering adding a new line to its product
mix, and the capital budgeting analysis is being conducted by a MBA
student. The production line would be set up in unused space in
Sugar Land’ main plant. Total cost of the machine is $260,000. The
machinery has an economic life of 4 years, and MACRS will be used
for depreciation. The machine will have a salvage value of 40,000
after 4 years.
The new line will generate Sales of 1,350 units per year for 4
years and the variable cost per unit is $100 in the first year.
Each unit can be sold for $200 in the first year. The sales price
and variable cost are expected to increase by 3% per year due to
inflation. Further, to handle the new line, the firm’s net working
capital would have to increase by $30,000 at time zero (The NWC
will be recouped in year 4). The firm’s tax rate is 40% and its
weighted average cost of capital is 10%.
|
Year 1 |
Year 2 |
Year 3 |
Year 4 |
|
|
Depreciation |
|
Year 1 |
Year 2 |
Year 3 |
Year 4 |
|
|
$ Sales |
||||
|
$ Variable costs |
|
Year 1 |
Year 2 |
Year 3 |
Year 4 |
|
|
Sales |
||||
|
OCF |
|
Year 0 |
Year 1 |
Year 2 |
Year 3 |
Year 4 |
|
|
CF of the project |
|
NPV = |
|
|
IRR = |
|
|
MIRR = |
|
|
PI |
In: Economics
$7000 is invested for a period of 10 years at 15% interest. Payments of $300 are added at year 1, $400 at year 2, $500 at year 3, etc. increasing until year 10. You also make lump sum payments of $2500 at year 3 and year 7. What is the future worth?
In: Economics
EXPECTATIONS THEORY Assume that the real risk-free rate is 2% and that the maturity risk premium is zero. If a 1-year Treasury bond yield is %5 and a 2-year Treasury bond yields 7%, what is the 1-year interest rate that is expected for Year 2? Calculate this yield using a geometric average. What inflation rate is expected during Year 2? Comment on why the average interest rate during the 2-year period differs from the 1-year interest rate expected for Year 2.
In: Finance