This is part 1 of a 4 part MATLAB question. In this part, you are to upload a scan of your handwritten notes.
Start with EITHER your WA09A working code and your WA09B code. Modify the code so that you build an array that is plotted for f(x) and g(x). Use the following:
x = 3.2 : 0.01 : 3.7
To plot the following two equations:
f(x) = 3x3 - 4x2 + 1 and g(x) = 6x2 + 2x - 2
You will need to relook at lesson Introduction to MATLAB on plotting.
To answer this part of WA09C - upload a scan of your Handwritten notes.
WA09A Code
clear;clc
for x = 1:16
y(x) = -2 * (0.1*x^2 - 2*x + 1);
end
y
`Hey,
Note: If you have any queries related the answer please do comment. I would be very happy to resolve all your queries.
clc%clears screen
clear all%clears history
close all%closes all files
format long
x = 3.2 : 0.01 : 3.7;
f=[];
g=[];
for i=1:length(x)
f(i)=3*x(i).^3 - 4*x(i).^2 + 1;
g(i)=6*x(i).^2 + 2*x(i) - 2;
end
plot(x,f,x,g);
xlabel('x');
ylabel('f(x)/g(x)');
title('Plot of f(x) and g(x)');
legend('f(x)','g(x)');
Kindly revert for any queries
Thanks.
This is part 1 of a 4 part MATLAB question. In this part, you are to...
Please follow following
scripts:
Script for part A:Script for Part
B:
Matlab Exercises 1. Find the determinant (command: det(A)) and the condition number (command: cond(A)) of the Hilbert matrix H of order k (command: hilb(k)), for k = 1,2, ..., 10. Plot the determinant and the condition number as a function of k using a logarithmic scale for the vertical axis. Hint: The template to help you with this homework assignment is homework/hw15.m. 2. Determine if y is in the...
Consider the function f(x) = x3 – 2x2 + x Write the MATLAB code in the format of "script file" using "Regula Falsi Method" with the estimated relative error of 0.000001 and upload the script file. Direction: 1) Please submit"script file", NOT "function file". If you submit a function file, I will assign ZERO score. 2) You can find some matlab code for the Regula Falsi Method on a web or some books. You can use any code you can...
You begin on 1 January 2015 by making an initial deposit of $5,000 to open a savings account at Bank of Mason. This account pays 0.135% interest per month. Every even numbered month, you withdraw $500 to pay your tuition installment balance. At the end of December each year you receive a $2,000 end-of-year bonus from your employer which you deposit into your account. Run your simulation until your account balance goes negative. • Question 1: • Question 2: During...
MATLAB question I need the code
exactly as you would write it in MATLAB. thank you
1. Consider a Gaussian solution of the traveling-wave form ψ(z,t)-exp(-a(z-vt)2). The parameter values are a 1, 2. (a) Explain the physical meaning of these parameters (eg. what would happen if we took a = 10 instead?) Determine the direction of propagation of this solution: Is it traweling to the left or to the right? (2pts) (b) Write a Matlab code to plot the Gaussian...
You are given a finite step function xt=-1 0<t<4 1 4<t<8. Hand calculate the FS coefficients of x(t) by assuming half- range expansion, for each case below. Modify the code below to approximate x(t) by cosine series only (This is even-half range expansion). Modify the below code and plot the approximation showing its steps changing by included number of FS terms in the approximation. Modify the code below to approximate x(t) by sine series only (This is odd-half range expansion).. Modify...
For this In-Class Exercise, you are asked to build a MATLAB code that makes a few assignment statements and a logical test with random numbers. To answer this ICE, you will need to upload a screenshot of your successful run showing ALL of the outputs. Remember to use good programing skills for the code. For your outputs: If your output for a step below is a single value, use a command similar to:fprintf(‘Question 5 answer: %4.3f \n,A) or fprintf(‘Question 5...
For this In-Class Exercise, you are asked to build a MATLAB code that makes a few assignment statements and a logical test with random numbers. To answer this ICE, you will need to upload a screenshot of your successful run showing ALL of the outputs. Remember to use good programing skills for the code. For your outputs: If your output for a step below is a single value, use a command similar to:fprintf(‘Question 5 answer: %4.3f \n,A) or fprintf(‘Question 5...
Write a program in Matlab that solves linear systems of
equations using Gauss elimination with partial pivoting. Make sure
that you use variables that are explicit, and make sure to include
comment lines (each subroutine should have at least a sentence
stating what it does). Make sure that your program checks for valid
inputs in matrix and vectors dimensionality.
• Using your code, solve the systems of equations in problems
9.11, 9.12, and 9.13
9.11
9.12
9.13
2x1-6x2-X3 =-38 We...
Calculus 1 MAT 201 Final Exam, Spring 1 2019, LAGCC Evaluate the following limits, you may use L'Hospital's rule, if it applies. -V31+4 lim 4-1 -4 a. b. Evaluate the following limit. lim xIn x x-0 2. Evaluate and explain your answer -xsin(x)+cos (x) x+1 130 dx (a.) 130 Differentiate each of the following below using the fundamental theorem of calc part 1 X cos? (1- 51) dt ) g (x) = S_ e (2c) g(t)= J x2t+1 3 Use...
ICEOZA: Solving an couation using MATLAB - (isine Vester inputs) Using the Van der Waals equation of state for a real gas, we can calculate the work produced by a quantity of gas when that gas undergoes a reversible, isothermal expansion at temperature T. from initial volume V, to final volume V. That expression for reversible, isothermal work is as follows: work = ==RTI ( - ) ** ( ) where: R 0.082057; V, -1.25 V - 3.0; n10: T-800:10:...