## Question

###### Question4 The six lines below from MATLAB script contain coding mistakes that will cause errors. P...

Question4 The six lines below from MATLAB script contain coding mistakes that will cause errors. P and explain those mistakes and propose corrections. 2.5 Marks Answer: x [-12-3 7]: % this line is correct! x(-3) 3; Plot(x): 96 uestion 5 2.5 Marks Give the display result in the command window for each command MATLAB Commands Displayed results 1 y xsqrt(-1); 2 x- roots([1 1 -6]) 3 a poly(12 -3) 4 Cl1 1-6 polyval(c, 1)

## Answers

question 4x=[-1 2 -3 7]%this line is correct

%x(-3)=3; This line is wrong. x(-3) is wrong. Subscript must be an integer.

x(3)=3;

%z=x*x //This line is wrong. For element by element multiplication, .* must be used.

z=x.*x;

%plot(x) //This line is wrong. For discrete time vector, stem is the plot command line path

stem(x);

Command window:x =

-1 2 -3 7

x =

-1 2 3 7

z =

1 4 9 49

Question 5x=-i; %i=sqrt(-1)

y=x*sqrt(-1); %(-i)*(i)=-((i)^2)=-(-1)=1

x+y %-i+1=1-i

#### Similar Solved Questions

1 answers

##### Modern Physics for Scientists and Engineers (3rd) By Thornton,problem # 59/ chapter6

Two nanowires are separated by 1.2 nm as measured by STM. Inside the wires the potential energy is zero, but between the wires the potential energy is greater than theelectron's energy by only 1.4 eV. Estimate the probability that the electron passes from one wire to the other....

1 answers

##### Required: Calculate this company's gross profit. (3 points) SLYOSS saouMO pue suua sajes wauno ssp srs...

Required: Calculate this company's gross profit. (3 points) SLYOSS saouMO pue suua sajes wauno ssp srs Ang yo upaos aup ao PIOS spoca jo iso Sabor purchased $17,800 of merchandise on April 7 with credit terms ofd/1 /30. Merchandise with a cost of $1,800 was damaged and returned to the seller on ...

1 answers

##### Linear algebra, I need someone to tell me how to get T(1)=1,1,1 T(x)=-1,0,1 T(x^2)=1,0,1 T(x^3)=-1,0, 1...

Linear algebra, I need someone to tell me how to get T(1)=1,1,1 T(x)=-1,0,1 T(x^2)=1,0,1 T(x^3)=-1,0, 1 I don't have any clue to find this. please follwo the comment WHAT FORMULA SHOULD I PLUG IN WHEN I PLUG IN T(1), T(X)...... How about this: Problem 2. Let P3 = Span {1,2,22,23 , the vector sp...

1 answers

##### Debts on the basis of the aging schedule. Show the T-account for the Allowance for Bad...

debts on the basis of the aging schedule. Show the T-account for the Allowance for Bad Debts at December 31, 2018. Debts by using the age of each account. * Data Table Age of Accounts 1-30 Days Accounts Receivable $ 60,000 Estimated percent uncollectibles 0.5% 31-60 Days $ 40,000 3.0 % 61-90 Days $ ...

1 answers

##### Hey guys I was hoping someone could help with these questions. I have also attached the...

Hey guys I was hoping someone could help with these questions. I have also attached the template thank you TAFE DIGITAL Task 3 20 marks Prepare the General Journal entries, with narrations, for the following unrelated transactions of Terra Tory Pty Ltd which is registered for GST for all its produ...

1 answers

##### Hello, Using HTML/Javascript, can somebody help me create an array and fill with random numbers 1-100,...

Hello, Using HTML/Javascript, can somebody help me create an array and fill with random numbers 1-100, per the number entered in the "Create Array" box of my html, and have it display when the "Create Array" box is clicked? Here is the HTML for this portion: Thank you! <table styl...

1 answers

##### Agribusiness In 2013, American consumers spent over $1 trillion on food for at-home and away-from-home consumption....

Agribusiness In 2013, American consumers spent over $1 trillion on food for at-home and away-from-home consumption. While the marketing share percentage of the farm-food marketing bill has stayed relatively the same over the years, the dollar amount has increased from $441 billion to $852 billi...

1 answers

##### Please show all steps! I need help showing . How do you do the mgf We were...

Please show all steps! I need help showing . How do you do the mgf We were unable to transcribe this imageEXAMPLE 9.5 Suppose that Yı, Y2, ..., Yn is a random sample from a normal distribution with mean u and variance o2. Two unbiased estimators of o2 are 1 (Y1 – Y2) -1 2 1 3 =...

1 answers

##### Highsmith Rental Company purchased an apartment building early in 2021. There are 15 apartments in the...

Highsmith Rental Company purchased an apartment building early in 2021. There are 15 apartments in the building and each is furnished with major kitchen appliances. The company has decided to use the group depreciation method for the appliances. The following data are available: Service Life (in Yea...

1 answers

##### How do we stop ourselves getting ill in the first place?

How do we stop ourselves getting ill in the first place?...

1 answers

##### Need a FLOW Chart for that code. #include <iostream > using namespace std; int PowerFive(int); //Function...

Need a FLOW Chart for that code. #include <iostream > using namespace std; int PowerFive(int); //Function prototype declaration int main() for (int i=-10 ; i(z10; 1++) {//for each # cout<<"("<< ǐ<<") ^5. "<<PowerFive(1)くくendl;// cal...

1 answers

##### Part F- Write down the experimental value listed in Table 1 for the combustion of 1...

Part F- Write down the experimental value listed in Table 1 for the combustion of 1 mole of methane, CH4g). CH4(g) + 2O2(g) + CO2(g) + 2 H2O(l) AHTable 1 = Submit Request Answer Part G - How does your calculated value compare to the experimental value listed in Table 1? Offer an explanation for any ...

1 answers

##### Find us if u = [X•P(x)]. Then, find o if o2 = {[x? • P(x)] –...

Find us if u = [X•P(x)]. Then, find o if o2 = {[x? • P(x)] – 12 x 10 11 12 13 14 15 P(x) | 0.0001 0.0022 0.0244 0.1382 0.3915 0.4436 u= (Simplify your answer. Round to four decimal places as needed.) o= (Simplify your answer. Round to four decimal places as needed.)...

1 answers

##### Item 1 Gaseous hydrogen odides placed in a closed container at 25°C where it partially decomposes...

Item 1 Gaseous hydrogen odides placed in a closed container at 25°C where it partially decomposes to hydrogen and lodine 2H (8) H() +1(s) Algulbrum it is found that HT - 351x100 M H, -476-104 Mand (1) - 4.76x10M Part A What is the value of Ke at this temperature? Express the equilibrium constant...

1 answers

##### As ( Homework: HW 2: Forecast II Save Score: 0 of 1 pt elati 4 of...

as ( Homework: HW 2: Forecast II Save Score: 0 of 1 pt elati 4 of 14 (7 complete) Problem 4.13 HW Score: 40.44%, 6.07 of 15 pts Question Help nom As you can see in the following table, demand for heart transplant surgery at Washington General Hospital has increased steadily in the past few years ds ...

1 answers

##### Please help is due in 30 mins, will rate, Thank you! What is AG (in kJ/mol)...

Please help is due in 30 mins, will rate, Thank you! What is AG (in kJ/mol) at 298 K for a reaction that has AHrxn = -19.4200x10^1) kJ/mol and ASrxn = -(1.84x10^2) J/K mol?...

1 answers

##### Ework Assignment Enviro Company issues 700%, 10 year bonds with a par value of $360,000 and...

ework Assignment Enviro Company issues 700%, 10 year bonds with a par value of $360,000 and semiannual interest payments. On the issue date, the annual market rate for these bonds is 4.00%, which implies a selling price of 126.125 The straight-line method is used to allocate Interest expense. 1. Usi...