iztrans not giving correct result?

9 次查看(过去 30 天)
ABTJ
ABTJ 2019-5-29
回答: Paul 2025-9-3,1:58
I wrote a program to first find out z transform X of input x and then secondly applied inverse z transform to X to get back original x but when i use the iztrans command , i do not get the original input as shown highlighted in attached phot. My code is as follow
clc
clear all
close all
syms z n
x=n^2*heaviside(n) % original input
X=ztrans(x,z) % z transform of input
x1=iztrans(X,n) % Application of inverse z transform to get back original input

回答(2 个)

KALYAN ACHARJYA
KALYAN ACHARJYA 2019-5-29
Check here

Paul
Paul 2025-9-3,1:58
syms z n
The fact that the default value for heaviside(0) = 1/2 doesn't matter here, but should be kept in mid in general.
x=n^2*heaviside(n) % original input
x = 
X=ztrans(x,z) % z transform of input
X = 
x1=iztrans(X,n) % Application of inverse z transform to get back original input
x1 = 
expand(x1) % bearing in mind that the output of iztrans is only valid for n >= 0
ans = 

产品


版本

R2015a

Community Treasure Hunt

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

Start Hunting!

Translated by