Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Error with the Sin

조회 수: 3 (최근 30일)
Zubair Ghafoor
Zubair Ghafoor 2020년 5월 20일
마감: KSSV 2020년 5월 20일
%Using a script file (I)
clear;
format short g
%plot of sin with interval from [-pi,pi]
N=100;
x=linspace(-pi,pi,N)'
y=sin(x)
figure(1)
plot(x,y)
sf = 0.1
y = sin_scale(x,sf);
figure(2),
plot(x,y)
sf=[0.1 0.5 2];
N_sf = numel(sf);
sin_array = zeros(N,N_sf);
for ndx = 1: N_sf
sin_array(:,ndx) = sin_function_sf(x,sf(ndx));
end
figure(3),
plot(x,sin_array)
title(['A Sine fn; limits = [-pi pi]; Scale factors = ',num2str(sf)])

답변 (0개)

이 질문은 마감되었습니다.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by