In my assignment my lecturer wants me to write an equation solver in matlab but I need to get an input . Input will be the K in KxK matrix and I need to get K time(s) multiple of unknown. Let me know if there is an spesific operator for this.I couldn't find any tutorial video btw. Thanks a lot.
Asked
Active
Viewed 66 times
1 Answers
0
The functions zeros
and ones
do that:
k = 3
A = zeros(k)
B = ones(k)
In this example, A should be a 3x3
array filled with zeros, and B
should also be 3x3, filled with ones. If you need to specify types or non-square matrices, check the documentation I linked in the beginning of the post.

Joel Filho
- 1,300
- 1
- 5
- 7