Creating a matrix using the for loop function

How would I create this matrix
X= 1/2
0
0
0
0
0
0
0
0
0
In this case n=10. Is there a way to make this matrix where n=100, where the first entry is 1/2 and the rest are zeros

Antworten (1)

Kategorien

Mehr zu Loops and Conditional Statements finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 23 Feb. 2018

Beantwortet:

am 23 Feb. 2018

Community Treasure Hunt

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

Start Hunting!

Translated by