Suggestions required for creating T_z matrix as a function ?
Show older comments

I used this code for Calculation of T_z
% Fill the matrix T_z using the given formula
for i = 1:M
for j = 1:i % j goes from 1 to i
T_z(i, j) = nchoosek(i-1, j-1) * (-1)^(j+1);
end
end
% Display the resulting matrix T_z
disp('Matrix T_z:');
disp(T_z);
Solution
Matrix T_z:
1 0 0
1 -1 0
1 -2 1
Are there other alternatives to develop it as a function ?
Accepted Answer
More Answers (0)
Categories
Find more on Simulink in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!