My script is not publishing figures even though i have used snapnow

38 ビュー (過去 30 日間)
MRIDUL CHAUHAN
MRIDUL CHAUHAN 2018 年 12 月 28 日
回答済み: Husam Alfergani 2020 年 8 月 7 日
%% My Report
%LINEAR CONVOLUTION
clc
clear all
x=[2 1 -2 3];
h=[1 -1 3 -2]
xl=length(x);
hl=length(h);
c=0;
for i=1:xl
for j=1:hl
y(i,j+c)=x(i)*h(j);
end
c=c+1;
end
z=sum(y)
a=-2:4;
stem(a,z)
title('Linear convolution (17BEE0115)')
snapnow
%% Linear Convolution Using Inbuilt Function
z1=conv(x,h)
z2=cconv(x,h,xl)
figure(2)
stem(z2)
title('Circular convolution (17BEE0115)')
snapnow
%% Linear Convolution Using cconv
z3=cconv(x,h,xl+hl-1)
%% Convolution in frequency domain
X=fft(x,xl)
H=fft(h,hl)
Y=conv(X,H)
y1=ifft(Y,xl+hl-1)

採用された回答

madhan ravi
madhan ravi 2018 年 12 月 28 日
編集済み: madhan ravi 2018 年 12 月 28 日
doc publish % read it you can publish your code and figures as a pdf
doc saveas % to save figure
doc print % to save figure as pdf ,...
  8 件のコメント
madhan ravi
madhan ravi 2018 年 12 月 29 日
Mridul Chauhan's answer moved here for consistency:
Thank you Sir the second link had my solution and got to learn a few more things in addition to the one i was looking for.
madhan ravi
madhan ravi 2018 年 12 月 29 日
編集済み: madhan ravi 2018 年 12 月 29 日
Anytime :)

サインインしてコメントする。

その他の回答 (1 件)

Husam Alfergani
Husam Alfergani 2020 年 8 月 7 日
Make sure you uncomment close all command if you have it in your code.

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by