please help, how can i create the following matrix? ๐ = ( ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ โฏ ๐ ๐ ๐ ๐ ๐ ๐ โฎ โฑ โฎ ๐ ๐ ๐ โฏ ๐ ๐ ๐)
2 views (last 30 days)
Show older comments

3 Comments
Jan
on 29 Apr 2022
As usual for homework questions: Please post what you have tried so far and ask a specific question. The forum will not solve your homework.
By the way, this is not twitter: no # before the tags. There is no need for a "matlab" tag, because this is a Matlab forum. Thanks.
Answers (1)
Jan
on 29 Apr 2022
Use the functions triu, diag and tril .
Another option is to start with zeros(m, n) and running 2 for loops. Then compare the indices:
if i1 == i2
A(i1, i2) = exp(i1)
elseif i1 < i2
...
else
...
end
0 Comments
See Also
Categories
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!