how to add the sequences in the mat lab?

2 次查看(过去 30 天)
for ex i have sequences A=[1 2 3 4]
B=[1 2 ]
i want to add the zeros in the B sequence by comparing the length..

采纳的回答

Conrad
Conrad 2012-7-11
Did you mean something like this?
A = [1 2 3 4];
B = [1 2];
B = [B zeros(1,length(A)-length(B))];
B will then be equal to [1 2 0 0].

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 MATLAB 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by