Questions
In MATLab, 5.Which command enables the use of different axes on the left and right of...

In MATLab,

5.Which command enables the use of different axes on the left and right of a plot?

1.

plot

2.

plotyy

3.

semilogx

4.

loglog

5.

surfc

6. MATLAB is primarily used for ?

Financial Modeling

CAD drawings

Scientific and engineering data analysis, modeling and simulation

It is specific for engineering applications only

8. How would you access every even row in a 10 x 10 matrix B?

1.

B( 2: 2: 10, : )

2.

B( 1: 2: 10, : )

3.

B( : , 2: 2: 10)

4.

B(2: 10, : )

5.

B(2: 2: 10)

10. What command allows the user to adjust the min and max of the axes?

1.

lim

2.

axis

3.

axislimits

4.

can only be done via the plot command

16. Which key(s) allow you to recall a previous command?

1.

U for up and D for down

2.

The up and down arrow keys

3.

Enter

4.

Tab

21. What does ‘…’ mean when found at the end of a line when using the MATLAB editor?

1.

Makes the words following the ‘…’ a comment

2.

Indicates the command should use default settings for subsequent parameters

3.

Indicates a continuation of the command onto the next line, treating it as if it were entered onto one line

4.

Causes MATLAB to quit

23. The property ‘FontSize’ enables?

1.

Setting the size of the font in points

2.

Setting the font to bold

3.

Setting the font type

4.

Setting the font one point larger than it’s current size

In: Computer Science

A closed piston-cylinder system undergoes a cycle: ​Process 1 to 2 is an expansion process where...

A closed piston-cylinder system undergoes a cycle:
​Process 1 to 2 is an expansion process where heat is added. The temperature remains constant.
Process 2 to 3 is a constant volume heat addition process.
​Process 3 to 4 is a compression process where heat is lost. The pressure remains constant.
​Process 4 to 1 is polytropic expansion, Pvn​=constant with n=1.4 and it is adiabatic (Q=0).
​Assume air, ideal gas, with constant specific heats, k=1.4. R=.287kJ/kgK
​State 1: T=300K, P=150kPa
​State 2: T=300K, P=100kPa
State 3: P=600kPa
​State 4: P=600kPa

​a.) Find the temperature for State 3 and State 4.
​b.) For all 4 States, find volume(m3/kg)
​c.) For each process, (1-2, 2-3, 3-4, 4-1), find Q/m(kJ/kg), W/m(kJ/kg), and Δu(kJ/kg)
​d.) Plot all 4 States on a P-v diagram
​e.) Is this a power or refrigeration cycle?
​f.) Calculate the efficiency or coefficient of performance based on your answer to part e.

In: Mechanical Engineering

Suppose that two players are playing the following game. Player 1 can choose either Top or...

Suppose that two players are playing the following game. Player 1 can choose either Top or Bottom, and Player 2 can choose either Left or Right. The payoffs are given in the following table

   Player 2

Player 1

Left

Right

Top

6 5

9 4

Bottom

7 4

5 3

where the number on the left is the payoff to Player A, and the number on the right is the payoff to Player B.

A) (4 points) Does player 1 have a dominant strategy, and if so what is it?

B) (4 points) Does player 2 have a dominant strategy and if so what is it?

C) (4 points each) For each of the following strategy combinations, write TRUE if it is a Nash Equilibrium, and FALSE if it is not:

i) Top/Left

ii) Top/Right

iii) Bottom/Left

iv) Bottom Right

D) (4 points) What is Player 1’s maximin strategy?

E) (4 points) What is player 2’s maximin strategy?

F) (4 points) If the game were played with Player 1 moving first and player 2 moving second, using the backward induction method discussed in the class notes, what strategy will each player choose?

In: Economics

Q1.The results of a batch settlement analysis carried out on a mixed suspension are given in...

Q1.The results of a batch settlement analysis carried out on a mixed suspension are given in the following Table 1.

      Plot the cumulative velocity profile of the suspended solids and compute the predicted removal rate by settlement.

Number Sample depth(m) Sample time(h) SS in sample (mg/l)
1,2,3 1,2,3 0 222(averaged)
4 1 1 140
5 1 3 108
6 1 6 80
7 2 1 142
8 2 3 110
9 2 6 106
10 3 1 142
11 3 3 130
12 3 6 124
13 4 1 147
14 4 3 126
15 4 6 114

           

In: Other

Write a public class call CountInts. class CountInts has a main method. CountInts must have two...

Write a public class call CountInts.

class CountInts has a main method.

CountInts must have two methods: count and displayResults.

1. method count takes an array, aa, of ints and counts how many times
each integer appears in aa.  The integers can only be from 0 to 100
inclusive.

2. method display results displays the results of the count

3. use the template provided.  insert your code in the places
indicated and don't change anything else.

Examples

% java CountInts 0 1 2 3 4 5 2 3 4 5 4 5 5 [0, 1, 2, 3, 4, 5, 2, 3, 4, 5, 4, 5, 5] 0 occurs ONE time 1 occurs ONE time 2 occurs 2 times 3 occurs 2 times 4 occurs 3 times 5 occurs 4 times % java CountInts 0 1 2 1000 -3 2 [0, 1, 2, 1000, -3, 2] 0 occurs ONE time 1 occurs ONE time 2 occurs 2 times

Template:

import java.util.*;

public class CountInts {

public static void count(int [] aa){

/*insert your code here */

}

public static void displayResults(){

/*insert your code here */

}

public static int [] readArray(){

Scanner input = new Scanner(System.in);

String ss = input.nextLine();

String [] aa = ss.split("[, ]");

if(aa[0].length() == 0)

aa = new String[0];

//System.out.println(Arrays.toString(aa));

int [] dd = new int[aa.length];

int ii = 0;

for(String s : aa){

dd[ii++] = Integer.parseInt(s);

}

return dd;

}

public static void main (String[] args) {

int [] arr = readArray();

System.out.println(Arrays.toString(arr));

count(arr);

displayResults();

}

}

In: Computer Science

An arithmetic expression can be represented in three different formats: infix, prefix, and postfix. In the...

An arithmetic expression can be represented in three different formats: infix, prefix, and postfix. In the infix notation, the operator comes between two operands. In the postfix notation, the operator comes after its two operands. For example, an expression a/b can be transformed to ab/. The following are some examples of the postfix expressions:

2+6*4 Its postfix notation is 2 6 4 * +

2-3+5/4*9-1 Its postfix expression is 2 3 – 5 4 / 9 * + 1 -

For this assignment, write a JAVA program that reads an postfix expression and evaluates the postfix expression. Your program should display the following menu repeatedly:

1. Read an expression in postfix notation.

// Read an infix expression and print out the string for verification.

2. Evaluate the postfix expression.

0. Exit.

For the input string, you can make the following assumptions:

Input strings are error-free

+, -, *, / are the only operators used

All operand are positive integers consisting of one or more digits.

Space appears in the input string to separate the operands and operators.

Implement a class StackLink, which is a stack implemented by a linked list (Do not use the JAVA predefined class java.util.LinkedList). Your program should use stack operations to evaluate the postfix expression. The following figure shows how stacks can help.

The following are some results when your run the program:

C:'>java Homework4

Select from:

1. Read an expression in postfix notation.

2. Evaluate the postfix expression

0. Exit.

1

Enter a postfix expression: 32 15 2 * + 36 4 / -

The entered infix expression is: 32 15 2 * + 36 4 / -

Select from:

1. Read an expression in postfix notation.

2. Evaluate the postfix expression

0. Exit.

2

32 15 2 * + 36 4 / - = 53

Select from:

1. Read an expression in postfix notation.

2. Evaluate the postfix expression

0. Exit.

1

Enter a postfix expression: 3 4 / 15 * 9 / 6 8 * + 7 - 54 +

The entered infix expression is: 3 4 / 15 * 9 / 6 8 * + 7 - 54 +

Select from:

1. Read an expression in postfix notation.

2. Evaluate the postfix expression

0. Exit.

2

3 4 / 15 * 9 / 6 8 * + 7 - 54 + = 95

Select from:

1. Read an expression in infix notation.

2. Convert infix to postfix.

3. Evaluate the postfix expression

0. Exit.

0

Goodbye.

In: Computer Science

Please show work step by step, no excel. Thank you! The three alternative projects shown below...

Please show work step by step, no excel. Thank you!

The three alternative projects shown below have the expected cash flows that are given, and the cost of capital is 10%.

  1. Calculate the paybacks for all three projects. Rank the projects from best to worst based on their paybacks.
  2. Calculate the NPVs for all three projects. Rank the projects from best to worst based on their NPVs.
  3. Why are these two sets of rankings different?
year 0 1 2 3 4 5
Project A -10 4 3 2 1 5
Project B -10 1 2 3 4 5
Project C -10 4 3 2 1 10

In: Finance

Which one of the following sets of quantum numbers could be those of the distinguishing (last)...

Which one of the following sets of quantum numbers could be those of the distinguishing (last) electron of Mo?

a) n = 4, l= 0, ml= 0, ms= +1/2

(b) n = 5,l= 1, ml= 9, ms= -1/2

(c) n = 4,l= 2, ml= -1, ms= +1/2

(d) n = 5,l= 2, ml= +2, ms= -1/2

(e) n = 3,l= 2, ml= 0, ms= +1/2

I KNOW THE ANSWER IS C BUT PLEASE EXPLAIN WHY THAT IS THE ANSWER AND HOW YOU GET TO THESE ANSWERS. I DONT GET WHY!

In: Chemistry

Which of the following is the correct sequence that describes the excitation and contraction of a...

  1. Which of the following is the correct sequence that describes the excitation and contraction of a skeletal muscle fiber?

    1. Tropomyosin shifts and unblocks the cross-bridge binding sites.

    2. Calcium is released and binds to the troponin complex.

    3. The sarcoplasmic reticulum is depolarized when a wave of depolarization moves from the neuromuscular junction into the cell's interior by way of the transverse tubules.

    4. The thin filaments are ratcheted across the thick filaments by the heads of the myosin molecules using energy from ATP.

    5. An action potential in a motor neuron causes the axon to release acetylcholine, which depolarizes the muscle cell membrane at the neuromuscular junction.

    a.

    12 → 3 → 4 → 5

    b.

    21 → 3 → 5 → 4

    c.

    3 → 421 → 5

    d.

    5 → 3 → 124

    e.

    5 → 3 → 214

  2. All of the following statements about a true hormone are correct except:

    a.

    They can be modified amino acids, peptides or steroid molecules

    b.

    They are used to communicate between different organisms.

    c.

    They are carried by the circulatory system

    d.

    They elicit specific biological responses from target cells.

    e.

    All of the above are correct statements about hormones.

In: Biology

Write up to 10 lines to explain the logic used behind this code pls!!!!! *****************************************/ #include...

Write up to 10 lines to explain the logic used behind this code pls!!!!!

*****************************************/

#include <iostream>

#include <string>

#include <iomanip>

#include<activaut.h>

#include<activdbg.h>

using namespace std;

int main()

{

    int MatchesPlayed[6], MatchesWon[6], MatchesLost[6], MatchesDraw[6], MatchesPoints[6], TotalPoints[6];

    MatchesWon[0] = 3; MatchesLost[0] = 0; MatchesDraw[0] = 1; //India

    MatchesWon[1] = 2; MatchesLost[1] = 0; MatchesDraw[1] = 1; //NZ

    MatchesWon[2] = 0; MatchesLost[2] = 3; MatchesDraw[2] = 0; //Australia

    MatchesWon[3] = 1; MatchesLost[3] = 2; MatchesDraw[3] = 1; //West Indies

    MatchesWon[4] = 1; MatchesLost[4] = 0; MatchesDraw[4] = 1; //SA

    MatchesWon[5] = 1; MatchesLost[5] = 3; MatchesDraw[5] = 0; //England

    int TotalPlayed = 0, TotalWon = 0, TotalLost = 0, TotalDraw = 0, TP = 0;

    for (int i = 0; i < 6; i++)

    {

        MatchesPlayed[i] = MatchesWon[i] + MatchesLost[i] + MatchesDraw[i]; //MATCHES FOR EACH TEAM

        TotalPoints[i] = 2 * MatchesWon[i] - 1 * MatchesLost[i] + 1 * MatchesDraw[i]; //POINTS FOR TEAMS

        TotalPlayed = TotalPlayed + MatchesPlayed[i];

        TotalWon = TotalWon + MatchesWon[i];

        TotalLost = TotalLost + MatchesLost[i];

        TotalDraw = TotalDraw + MatchesDraw[i];

        TP = TP + TotalPoints[i];

    }

    cout << "                                                     2019 Cricket WorldCup \n ";

    cout << "Countries             Matches_Played      Matches_Won      Matches_Lost      Draw/Rain      Total_Points\n";

    cout << "---------             --------------      -----------      ------------      ---------      ------------\n";

    cout << "INDIA                      " << MatchesPlayed[0] << "                   " << MatchesWon[0] << "                 " << MatchesLost[0] << "               " << MatchesDraw[0] << "               " << TotalPoints[0] << "\n";

    cout << "NZ                         " << MatchesPlayed[1] << "                   " << MatchesWon[1] << "                 " << MatchesLost[1] << "               " << MatchesDraw[1] << "               " << TotalPoints[1] << "\n";

    cout << "AUSTRALIA                  " << MatchesPlayed[2] << "                   " << MatchesWon[2] << "                 " << MatchesLost[2] << "               " << MatchesDraw[2] << "               " << TotalPoints[2] << "\n";

    cout << "WEST INDIES                " << MatchesPlayed[3] << "                  " << MatchesWon[3] << "                 " << MatchesLost[3] << "               " << MatchesDraw[3] << "               " << TotalPoints[3] << "\n";

    cout << "SA                         " << MatchesPlayed[4] << "                   " << MatchesWon[4] << "                 " << MatchesLost[4] << "               " << MatchesDraw[4] << "               " << TotalPoints[4] << "\n";

    cout << "ENGLAND                    " << MatchesPlayed[5] << "                   " << MatchesWon[5] << "                 " << MatchesLost[5] << "               " << MatchesDraw[5] << "               " << TotalPoints[5] << "\n";

    cout << "TOTAl                      " << TotalPlayed << "                  " << TotalWon << "                 " << TotalLost << "               " << TotalDraw << "               " << TP << "\n";

    return 0;

}

In: Computer Science