03 the cost per mile for a rented vehicle is one dollar for the first 100 kilometer, 0.8 dollar for the next 200 kilometer and 0.7 dollar for all miles excess of 300 kilometer. Write Matlab code that determine the total cost and average cost per kilometer for a given number of miles (stored in variable called distance).
Q: Print rows in desired sorted order.
A: 1. get input n, m 2. create vector of vector of size n 3. get input in vector 4. sort the array…
Q: Write a Matlab code to perform the following: a) Ask the user to enter a number, and place it in the…
A: Answering only the first 3 subparts as per the rules. In the above question we have to enter 25…
Q: 2. Assuming that the data collector makes an entry error when collecting data, it canbe ensured that…
A: Answer is given below -
Q: Page Frame 6. 1 2 2 4 What are the physical addresses for the following logical addres a) (1,5) b)…
A: (1,5) Physical address = 2 x 8 + 5 =21 (2,0) Physical address = 0 x 8 + 0 = 0
Q: pblem Expand the circuit in Figure 6-25 to a 16-bit comparator.
A: A 16 bit comparator
Q: ) Write C++ program that ask the user to enter two numbers then the program will print the following…
A: #include<iostream> using namespace std; int main(){ int m, n; cout << "Enter two…
Q: Complete the sentences. Use a superlative (-est or most ...) + a preposition (of or in).Spring is a…
A: Actually, we can use superlative degree when we have given verb. here the verb is busy.
Q: 1. Create a 5 by 3 array of random integer numbers ranged from 0 to -90,
A:
Q: dee- -1 50 STD/D 1,000 For the 1D, block-centered grid shown in Fig. 1,000 ft determine the pressure…
A:
Q: -.Describe the limitations of Bluetooth as a wireless standard. - Identify the generation of your…
A: As per our guidelines we are supposed to answer only one question. Kindly repost other questions as…
Q: A vertical line is a line going from left to .right True O False O
A: In computer graphics, line is collection of points which are joined through pixel points.
Q: William Shakespeare is a famous signer in * .the United Kingdom True False O O
A: False.
Q: 7- Simulation tests all the logic a. Gate speed b. Functions c. Tools 8- EDA test bench creation…
A: i have provided this answer with full description in step-2.
Q: Q5.A) A unity feedback continuous control system has a forward path transfer function G(s)=k/s(s+5)…
A:
Q: 3. Which is wrong for support vector machine? O SVM finds a decision boundary with a minimum margin…
A: Answer. Option C = is wrong Support Vector Machine (the "street machine") is liable for…
Q: Homework: Determine the critical path(s) for the following projects: Activity Predecessor(s)…
A: Given:
Q: resource record in the Domain Name System (DNS) used to specify that a domain name is an alias for…
A: Canonical Name: Canonical Name (CNAME) records are used to alias one-name to another domain. Using…
Q: 6- You can stop looking for his watch. He, A) has/been found D) will / have found _just B) has /…
A: Will: expressing the future tense. Has: Third person singular present tense of 'have'. It is used in…
Q: Write 8085 program to read the memory content(8-bit) (in range 00H to 10H) at location 2050H and…
A: Given a 8-bit number in the range 00H to 10H at memory location 2050H. It is to be added to the…
Q: Using MATLAB draw the equation: U(theta)=cos(2theta) cos(3theta)
A: The following step provides the solution in MATLAB to plot a graph for the given equation…
Q: suppose we have made the following measurements: frequency of FP operations = 30% ;average cpi of FP…
A: In computer architecture, optimizing performance often involves improving the execution efficiency…
Q: Q2] Write a program that enters the name of several students with a number of their grades in a…
A: NOTE Below is the answer for the given question. Hope you understand it well. If you have any…
Q: 3. Implement a 32-bit subtraction of two numbers X and Y that are stored in memory as: X = (DS:…
A: Hi there, Please find your code below, I tried as fast as i can to answer the question, I hope you…
Q: (e) Prove, by induction on n, that for all n, a product of n fundamental unit quaternions represents…
A:
Q: 2_Using the circle of the half-sum and the total sum, add the two numbers, that is, draw a logical…
A: We need to draw circuit using logic gates for addition of given numbers.
Q: Write a 5-page report on computer networks, their types and examples of where to use them
A: Given: To write a report on computer network.
Q: 1. The program prompts the user to enter her/his name, age, sex, email and address. 2. Then the user…
A: Accept all the inputs one after the other and age and selection will only be parsed as integers
Q: Write a C++ program using a do/while loop to print the following figure
A: Given: i need the answer quickly
Q: Use the Relational algebra to retrieve the First names (Fname) and Salary of all employees in…
A: Provided the relational algebra for the above given query is given as shown in the below attached…
Q: 2- Write a program to find the current I in the circuit shown below a) By using conditional…
A: Here, I am going to write a python program to find the current in the circuit for the above code.
Q: Q1) Draw the ladder diagram for the logic circuits A&B А: A AB в AB + AB AB
A: The gate given in the image is Exclusive-OR gate.
Q: Write a C++ program that asks the user to enter any two numbers from 1 to 999. Then, the program…
A:
Q: use debug to write an assembly program to copy six bytes from memory location at address 2000:200 to…
A: Algorithm – 1. set the value of offset SI equal to 500.2. set the value of offset DI equal to 600.3.…
Q: In Access, it is the area of the screen in which the names of tables, forms, reports, macros, and…
A: Navigation pane Navigation pane provide a fast way to access the object in Microsoft access. It is…
Q: Write down 4 to 5 Requirements Tests of Sales Management System by using the Following template.…
A: Answer: I have given answer in brief explanation .
Q: class Test{ public static void main(String[] args) { int number=9; double variable=D1.5;…
A: The problem is based on the basics of java programming language.
Q: 3.1 Consider a Markov chain with transition matrix (1/2 1/4 1/2 1/2 1/4 1/4 1/2 1/4 1/2 1/4) 1/4) P…
A: GIVEN:
Q: IYou are required to show workingl 1. Using the following illustration, what would be the IP address…
A: ANSWER:-
![Q3
the cost per mile for a rented vehicle is one dollar for the first 100 kilometer, 0.8 dollar for the
next 200 kilometer and 0.7 dollar for all miles excess of 300 kilometer. Write Matlab code that
determine the total cost and average cost per kilometer for a given number of miles (stored in
variable called distance).](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F10643b85-8a0b-4f61-a1fc-48d979c606c7%2Fe56183b7-5584-46c8-8e07-1301ae589524%2Foyhuupk_processed.jpeg&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 4 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
- zero-pressure specific heat of dry air cp in kJ/(kg K) is given by: cp = 0.99403 + 1.671 × 10−4T + 9.7215 × 10−8T 2 −9.5838 × 10−11T 3 + 1.9520 × 10−14T 4 Here T is absolute temperature in K.Write a MATLAB script (a) to plot cp versus T in the range between 0 to 1500 K, and (b) to determine the temperature that corresponds to a specific heat of 1.1 kJ/(kg K) with MATLAB polynomial functions. NOTE: 1. Axis titles and units are compulsory 2. The range the axes are to be set in such that the plot is visible in at least 70% of the plot canvassSolution by Matlab Write a program in Matlab language that asks the student to enter the grades of the last year and then calculates and prints the student's score corresponding to the mark if the mark is (excellent, very good, good.......)Matlab A rocket is launched vertically and at t-0, the rocket's engine shuts down. At that time, the rocket has reached an altitude of ho- 500 m and is rising at a velocity of t125 m/s. Gravity then takes over. The height of the rocket as a function of time is: h(t)- ho+vot-gt², t20 where g = 9.81 m/s². The time t=0 marks the time the engine shuts off. After this time, the rocket continues to rise and reaches a maximum height of himax meters at time t-tmax. Then, it begins to drop and reaches the ground at time t = tg. a. Create a vector for times from 0 to 30 seconds using an increment of 2 s. b. Use a for loop to compute h(t) for the time vector created in Part (a). e. Create a plot of the height versus time for the vectors defined in Part (a) and (b). Mark the z and y axes of the plot using appropriate labels. d. Noting that the rocket reaches a maximum height, Amax, when the height function, h(t), attains a maxima, compute the time at which this occurs, tmax, and the maximum…
- PYTHON Write a python program that calculates the populations of foxes and rabbits who live within a certain area of land, as that number changes from year to year. It will take the initial populations as inputs, and then proceed to calculate the year-by-year changes. The following is derived from the “Lotka-Volterra equations”, which you may look up if you desire. Essentially, we will model the foxes and rabbits with 4 constants, and 2 data structures of year-by-year values. They are defined as follows: r[y] # of rabbits in year y f[y] # of foxes in year y α or alpha - birth rate of rabbits β or beta - death rate of rabbits, dependent on # of foxes γ or gamma - birth rate of foxes, dependent on # of rabbits δ or delta - death rate of foxes, caused naturally The formulas we will use are: r[y]=r[y−1]+(r[y−1]×α)−(r[y−1]×f[y−1]×β)r[y]=r[y−1]+(r[y−1]×α)−(r[y−1]×f[y−1]×β) f[y]=f[y−1]+(f[y−1]×r[y−1]×γ)−(f[y−1]×δ)f[y]=f[y−1]+(f[y−1]×r[y−1]×γ)−(f[y−1]×δ) However, negative values are not…When you borrow money to buy a house, a car, or for some other purpose, you repay the loan by making periodic payments over a certain period of time. Of course, the lending company will charge interest on the loan. Every periodic payment consists of the interest on the loan and the payment toward the principal amount. To be specific, suppose that you borrow $1,000 at an interest rate of 7.2% per year and the payments are monthly. Suppose that your monthly payment is $25. Now, the interest is 7.2% per year and the payments are monthly, so the interest rate per month is 7.2/12 = 0.6%. The first months interest on $1,000 is 1000 0.006 = 6. Because the payment is $25 and the interest for the first month is $6, the payment toward the principal amount is 25 6 = 19. This means after making the first payment, the loan amount is 1,000 19 = 981. For the second payment, the interest is calculated on $981. So the interest for the second month is 981 0.006 = 5.886, that is, approximately $5.89. This implies that the payment toward the principal is 25 5.89 = 19.11 and the remaining balance after the second payment is 981 19.11 = 961.89. This process is repeated until the loan is paid. Write a program that accepts as input the loan amount, the interest rate per year, and the monthly payment. (Enter the interest rate as a percentage. For example, if the interest rate is 7.2% per year, then enter 7.2.) The program then outputs the number of months it would take to repay the loan. (Note that if the monthly payment is less than the first months interest, then after each payment, the loan amount will increase. In this case, the program must warn the borrower that the monthly payment is too low, and with this monthly payment, the loan amount could not be repaid.)USE PYTHON Source: en.wikipedia.org/wiki/Camel_case In some languages, it’s common to use camel caseLinks to an external site. (otherwise known as “mixed case”) for variables’ names when those names comprise multiple words, whereby the first letter of the first word is lowercase but the first letter of each subsequent word is uppercase. For instance, whereas a variable for a user’s name might be called name, a variable for a user’s first name might be called firstName, and a variable for a user’s preferred first name (e.g., nickname) might be called preferredFirstName. Python, by contrast, recommendsLinks to an external site. snake caseLinks to an external site., whereby words are instead separated by underscores (_), with all letters in lowercase. For instance, those same variables would be called name, first_name, and preferred_first_name, respectively, in Python. In a file called camel.py, implement a program that prompts the user for the name of a variable in camel case and outputs…
- Suppose that you are a teacher, depending on the number of students taking your course, write afunction where you can enter the names of students and their grades respectively.After executing/calling this function, you should see these results on your screen: the name and grade of the student with the highest grade the average of the all grades solve by using MATLAB programQ1: Please write a used-defined function in Matlab to monitor the balance of a bank account over years: Xi+1 = (1+ a) · x - b where the bank's annual interest rate a and the cash withdrawal amount b are defined as the global variables. Then write a main program to determine x1,X2, ,XN with x1=1000, a=0.05, b=200 until no money is left in the bank account after N years.Write algorithms to solve the problems given in each exercise. Note that you are NOT writing C++ code for this assignment. Please do not submit any code. Tom and Jerry opened a new lawn service. They provide three types of services: mowing, fertilizing, and planting trees. The cost of mowing is $35.00 per 5,000 square yards, fertilizing is $30.00 per application, and planting a tree is $50.00. Write an algorithm that prompts the user to enter the area of the lawn, the number of fertilizing applications, and the number of trees to be planted. The algorithm then determines the billing amount. (Assume that the user orders all three services.)
- Matlab A rocket is launched vertically and at t-0, the rocket's engine shuts down. At that time, the rocket has reached an altitude of ho- 500 m and is rising at a velocity of to 125 m/s. Gravity then takes over. The height of the rocket as a function of time is: h(t)-ho+vot-gt², t20 where g -9.81 m/s². The time t-0 marks the time the engine shuts off. After this time, the rocket continues to rise and reaches a maximum height of Amax meters at time t = tmax. Then, it begins to drop and reaches the ground at time t = tg. a. Create a vector for times from 0 to 30 seconds using an increment of 2 s. b. Use a for loop to compute h(t) for the time vector created in Part (a). e. Create a plot of the height versus time for the vectors defined in Part (a) and (b). Mark the and y axes of the plot using appropriate labels. d. Noting that the rocket reaches a maximum height, max, when the height function, h(t), attains a maxima, compute the time at which this occurs, max, and the maximum height,…Q Write a program in MatLab to enter a number of students' grades (n), then enter eaci grade, then find the average of the grades (Av) and display the result with words describing the result.In picture all the given described:+.
![C++ for Engineers and Scientists](https://www.bartleby.com/isbn_cover_images/9781133187844/9781133187844_smallCoverImage.gif)
![C++ Programming: From Problem Analysis to Program…](https://www.bartleby.com/isbn_cover_images/9781337102087/9781337102087_smallCoverImage.gif)
![C++ for Engineers and Scientists](https://www.bartleby.com/isbn_cover_images/9781133187844/9781133187844_smallCoverImage.gif)
![C++ Programming: From Problem Analysis to Program…](https://www.bartleby.com/isbn_cover_images/9781337102087/9781337102087_smallCoverImage.gif)