matlab code needed urgent
(a)
% create a vector for time
t = [ -pi : 0.01 : pi ];
% create a vector of same length as t to store f(t)
f = [ 1 : length(t) ];
for i = 1 : length(t)
% if -pi <= t < 0
if t(i) < 0 && t(i) >= -pi
f(i) = exp(t(i));
% if 0 <= t < pi
else
f(i) = exp(-t(i));
end
end
% set the label of axis
ylabel('f(t)');
xlabel('t');
grid on
hold
% plot the graph
plot( t , f );
Sample Output
(b)
% create a vector for time
t = [ 0 : 0.01 : 2 * pi ];
% create a vector of same length as t to store f(t)
f = [ 1 : length(t) ];
for i = 1 : length(t)
% if 0 <= t < pi/2
if t(i) < pi && t(i) >= 0
f(i) = -1;
% if pi / 2 <= t < 3 * pi / 2
elseif t(i) < 3 * pi / 2 && t(i) >= pi / 2
f(i) = 1;
% if 3 * pi / 2 <= t < 2 * pi
else
f(i) = -1;
end
end
% set the label of axis
ylabel('f(t)');
xlabel('t');
grid on
hold
% plot the graph
plot( t , f , 'r');
Sample Output
Matlab Code Needed MATLAB CODE Solve the system of non-linear equations:
MATLAB code needed: Use the newton's method to find the 37th root of 66453634 and show the number of iterations, ends of the interval and which will converge fastest falsi, secant or newtons method.
what is the procedure code and the diagnosis code for a broken finger in the urgent care clinic
What is the Matlab code needed to create the following Matrix: 1 0.5 0 0 0 0 0 0.5 0 0 P0 0.5 0 0.5 0 0 0 0.5 0 0 0.5 1
Matlab Type in good notes on this for an exam(Include code where needed) 21 6. understand histogram equalization: 22 understand how to compute it 23 4 7. understand morphological image processing: 5 dialation, erosion, openning, closing 6 7 8. understand simple matlab coding: 8 dot product, sum all the even numbers between 0 and 1000 distance between vectors 9. know the meaning and idea of optical flow and superpixel
Evaluate using MATLAB. The problem has been solved arithmatically but MATLAB code is needed. Use Matlab to evaluate: A tube with length of 1 m is made from steel (k 15 W/m/K) having a square cross section with a circular hole through the center, as shown below Calculate the steady state temperature distribution across the cross section and the total rate of heat transfer if the inner surface is held at 20 °C, and the outer surface is held at...
Urgent: Help with MatLab Program Create a Matlab function called seasonif. m which assigns to the numerical value of a month within the year a numerical value for the particular season in which that month occurs (see Table 2 above for numerical values to assign seasons). As usual, January is mouth 1, February is mouth 2, mid so on. Your function should allow decimal values (e.g. 4.68 should be considered part of April), but any value less than 1 or...
PLease urgent help me.(Singular Value Decomposition-MATLAB) THE SVD THEOREM Develop a one line MATLAB command to compute Σ-1 that only uses the function d i a g. THE SVD THEOREM Develop a one line MATLAB command to compute Σ-1 that only uses the function d i a g.
I need a working MATLAB CODE for GAUSS SEIDEL ITERATIVE SCHEME the matlab code must compare with actual value and break if this condition is not met i will dislike think before answering a correct working matlab code must be given or else i will dislike badly
Please provide MATLAB code and comments! Please provide MATLAB code and comments! Please provide MATLAB code and comments! Question #5. Write a script that creates a variable called BALANCE that is assigned the value 100.00. Then prompt the user to enter an amount to withdraw. Store that amount in a variable called WITHDRAW. Use an if/else construct to display a message to the user stating whether the withdrawal was successful. If the withdrawal would result in a negative balance, state...