Write a wellcommented MATLAB script program to plot the func

Write a well-commented MATLAB script program to plot the function f(x) = Sigma^50_k=1 Squarerootk sin(2pi kx) on the interval x Element [0, 1].

Solution

clear all; % clear all variables

clc; % clear screen

% function is divided into two components , one deals with calculation of square root and summation while other %deals with sin function

x=[0:1]; % as x varies from 0 to 1

k=1:50; % interval of summation varies from 0 to 50

y=sin(2*k*x); % sin function is used for radians and sind function is used for degrees

term = Sqrt(term)*y; % calculation of square root

plot (y,[0,1])

 Write a well-commented MATLAB script program to plot the function f(x) = Sigma^50_k=1 Squarerootk sin(2pi kx) on the interval x Element [0, 1].Solutionclear al

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site