write this following matrix
Mostra commenti meno recenti
How can I write the following matrix

I define n=100
And I generate the following code
D= toeplitz ([0 1 zeros(1, n-2) -1]/ (2*h))
but I get wrong matrix. How can I correct it?
6 Commenti
Zeynep Toprak
il 7 Mag 2020
Sindar
il 7 Mag 2020
click the links and read the examples
Sindar
il 7 Mag 2020
Also, try this general tutorial: https://www.mathworks.com/learn/tutorials/matlab-onramp.html
I'd been using Matlab for years and still found it useful
Zeynep Toprak
il 7 Mag 2020
Gokberk Yildirim
il 16 Mag 2020
Actually, it can be done with this Zeynep.
c = [0 -1 zeros(1,n-3)];
r = [0 1 zeros(1,n-3)];
D = toeplitz(c,r) / (2*h)
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Matrices and Arrays in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!