Matrices

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Matrices

Egshiglen Bat-Erdene
Hello

I wanted to ask about matrices. I should do a matrix which is full with 2, but the diagonal is from1 to 10. And A matrix with full zeros, however the diagonal's two sides are -1.
I hope you will help me soon.

Bests,

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Matrices

Doug Stewart-4


On Fri, Nov 24, 2017 at 11:29 AM, Egshiglen Bat-Erdene <[hidden email]> wrote:
Hello

I wanted to ask about matrices. I should do a matrix which is full with 2, but the diagonal is from1 to 10. And A matrix with full zeros, however the diagonal's two sides are -1.
I hope you will help me soon.

Bests,

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave


show us what you tried.

--
DASCertificate for 206392


_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Matrices

Kire Pudsje

On Fri, Nov 24, 2017 at 6:35 PM, Doug Stewart <[hidden email]> wrote:


On Fri, Nov 24, 2017 at 11:29 AM, Egshiglen Bat-Erdene <[hidden email]> wrote:
Hello

I wanted to ask about matrices. I should do a matrix which is full with 2, but the diagonal is from1 to 10. And A matrix with full zeros, however the diagonal's two sides are -1.
I hope you will help me soon.

show us what you tried.

I agree with Doug, (at least, I assume that he implies this sounds like homework).
Just a hint. the diag function not only retrieves the diagonal.
Once you comprehend that, the tasks are trivial one-liners.

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Matrices

Egshiglen Bat-Erdene
Oh thank you for the help. I found the answer. I will use the ones, substract, eye, use the diag 1:10 and multiply.

On Fri, Nov 24, 2017 at 6:55 PM, Kire Pudsje <[hidden email]> wrote:

On Fri, Nov 24, 2017 at 6:35 PM, Doug Stewart <[hidden email]> wrote:


On Fri, Nov 24, 2017 at 11:29 AM, Egshiglen Bat-Erdene <[hidden email]> wrote:
Hello

I wanted to ask about matrices. I should do a matrix which is full with 2, but the diagonal is from1 to 10. And A matrix with full zeros, however the diagonal's two sides are -1.
I hope you will help me soon.

show us what you tried.

I agree with Doug, (at least, I assume that he implies this sounds like homework).
Just a hint. the diag function not only retrieves the diagonal.
Once you comprehend that, the tasks are trivial one-liners.


_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave