Question

Draw any shape using your own code using MATLAE and it has to be multiple line Example code: clear all close all xls- 5 x1c=
0 0
Add a comment Improve this question Transcribed image text
Answer #1

close all,clear all,clc;
phi = pi/4;
DT = 10;
A = 10;
N = 100;
SNR = 10;
f = 1;
t = 0:DT/N:DT;
x = A*cos(2*pi*f*t - phi);
plot(t,x,'-r');

M = 50;
for k =1:M
n = randn([1,length(t)]);
y(k,:) = x + n;
end
hold on
plot(t,y);

Add a comment
Know the answer?
Add Answer to:
Draw any shape using your own code using MATLAE and it has to be multiple line...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Hello. I need help modifying this MatLab code. This is a basic slider-crank animation. the current...

    Hello. I need help modifying this MatLab code. This is a basic slider-crank animation. the current program stops the animation and then has the crank move backward. I need the crank to instead to move in full 360 degrees circular motion. Exactly like how a slide-crank mechanism works in real life. thank you and here is the code. %%Code Begins Here%% L1=0.2; L2=0.45; W=0.5; tt=linspace(0,15); for i=1:length(tt)     x2=@(t) L2+L1*sin(W*t);     y2=0;     X2=x2(tt(i));     Y2=y2;     sol= fsolve(@(x,x2,y2) root2d(x,X2,Y2),...

  • please help me with this MATLAB CODE and explain to me what each line does and...

    please help me with this MATLAB CODE and explain to me what each line does and what is used for? leave your comments as words, not as pictures. ..................................................................................................................................................................... clear all; close all; % For a script file, you better start with clear all and close all                        % However, for a fucntion, you better NOT to start                        % with them %% End of cell mode example %% Plot function t = 0:0.1:5; x1 = sin(2*5*t); x2 = cos(3*7*t);...

  • NB! This task is required to be solved in matlab. this task also requires the use...

    NB! This task is required to be solved in matlab. this task also requires the use of the function displayDualSpectrum(); which i have pasted in the bottom. the tasks that i need help with are A), B) and C). this is a multi-part question. Task - Frequency mixing We use a basic signal that can be described mathematically as follows: with this We shall then make an amplitude modulated signal: where fc is the carrier frequency. the code below specifies...

  • function [Rx] = matrixTransform(R) % MOD10TRANSFORM is a function which will visualise the effect of your...

    function [Rx] = matrixTransform(R) % MOD10TRANSFORM is a function which will visualise the effect of your % 2-by-2 transformation matrix R on a set of grid points. It will also plot % the eigenvectors of the matrix R if there are two real eigenvectors. close all; minX = -10; maxX = 10; minY = -10; maxY = 10; n = 10; pad = 5; corners = [minX, maxX, minX, maxX; maxY, maxY, minY, minY]; corners = [corners, R*corners]; corners =...

  • Wave Packets (a) Create a wave by adding two different waves by using Matlab, but different...

    Wave Packets (a) Create a wave by adding two different waves by using Matlab, but different combination than those we used in the class. Paste the output graph (and also the code). Any two waves can be chosen, but explain the difference compared to the original wave packet we obtained in the class. You can modify the code I used in the class, or build something from scratch. (b) Add as much waves as you want (minimum:3), using Matlab. Explain...

  • How can I get my while loop to run until my condition in my if statement...

    How can I get my while loop to run until my condition in my if statement is met? (In MATLAB) clc%clears screen clear all%clears history close all%closes all files format long %Euler's Method %Initial conditions and setup %Projectile motion x=3;%randi(3); y=3;%randi(3); figure('color','white'); plot(x,y,'bo'); hold on wind = (-10 + 20*rand(1)); fprintf('The wind speed is %2.2i\n',wind); v0= input('Initial velocity(m/s): '); a= input('Angle of projection(in degrees): '); a=a*pi/180; h=.01; cd=.1; %cdy=.1; %cdx=(rand*2-1)/2; %cdy=(rand*2-1)/2; m=1.5; g=9.8; %acceleration due to gravity in m/s^2 %td=2*v0*sin(a)/g;...

  • I DESPERATELY NEED HELP WITH THIS DIFFERENTIAL EQUATIONS MATLAB ASSIGNMENT IM SUPPOSED TO BE LEARNING BUT...

    I DESPERATELY NEED HELP WITH THIS DIFFERENTIAL EQUATIONS MATLAB ASSIGNMENT IM SUPPOSED TO BE LEARNING BUT WE HAVE A SUB AND HE DIDN'T TEACH IT! ITS EULER AND IMPROVED EULER IN MATLAB! HERE IS THE LINK FOR THE IMAGE FILE THAT SHOWS THE FULL INSTRUCTIONS FOR THE CODE. https://imgur.com/a/gjmypLs Also, here is my code so far that I borrowed form an old assignment but the data is all wrong and the application of the code is slightly different so either...

  • This assignment must be completed on your own with your team mates. Don't give your code...

    This assignment must be completed on your own with your team mates. Don't give your code to others or use other students' code. This is considered academic m will result 0 marks) Write a java program that mange JUC Bank accounts services. The program should have the following: The total number of accounts (n) will be specified by the user at the beginning of the program. Depending upon the entered number, create three Arrays as following o o o Array...

  • I have this py program and I need assistance using it. I am using Visual Studio...

    I have this py program and I need assistance using it. I am using Visual Studio and I need to know how to: Add a new vehicle Delete a vehicle Update vehicle attributes Print out inventory Here is the code: 1 2 import uuid from datetime import datetime class automobile: 3 4 5 6 7 8 9 def _init__(self,make: str, model: str,color: str,year: int,mileage: int): self._id = uuid uuid1().hex self. make = make self. model = model self. color =...

  • using this code to complete. it python 3.#Display Program Purpose print("The program will show how much...

    using this code to complete. it python 3.#Display Program Purpose print("The program will show how much money you will make working a job that gives a inputted percentage increase each year") #Declaration and Initialization of Variables userName = "" #Variable to hold user's name currentYear = 0 #Variable to hold current year input birthYear = 0 #Variable to hold birth year input startingSalary = 0 #Variable to hold starting salary input retirementAge = 0 #Variable to hold retirement age input...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT