how to create diagonal matrix while there is condition for each diagonal element

Greeting, I wanted to create a diagonal matrix that its elements are conditional as shown in the picture:

2 个评论

Can you provide more insight about the problem, such as the meaning of k,j,y...
y(k+j) and yhat(k+j) are integers and lambda is a symbol

请先登录,再进行评论。

回答(0 个)

类别

帮助中心File Exchange 中查找有关 Operating on Diagonal Matrices 的更多信息

产品

版本

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by