Making 1s matrix using loop

create a 1s matrix by using loops assign each element a new value in a matrix assign -1 on the adjacent diagonal and assign 3 on the main diagonal and 0 in remaining?

10 comentarios

Alex Mcaulley
Alex Mcaulley el 24 de Mzo. de 2020
What have you tried so far?
Wahab Ahmad
Wahab Ahmad el 24 de Mzo. de 2020
I m a beginner Plz help ma bro
Rik
Rik el 24 de Mzo. de 2020
At least show you put in some effort as well. The only way to learn is to try. We can help out, but if you don't put in any effort yourself you would need people on this forum to solve every problem you will ever have. If that is your long term strategy I suggest you hire a consultant.
Have a read here and here. It will greatly improve your chances of getting an answer.
Wahab Ahmad
Wahab Ahmad el 24 de Mzo. de 2020
Its my assignment work I didn't know about loop using to make matrix If you do something to do Then do it atleast
Rik
Rik el 24 de Mzo. de 2020
What exactly is your question? Do you know how to use loops at all? Do you know any way to create an array? If it is a homework assignment, you probably have some course notes you could have a look at to get some suggestions.
You can find guidelines for posting homework on this forum here.
Wahab Ahmad
Wahab Ahmad el 24 de Mzo. de 2020
If you don't help me Don't urge with me
Rik
Rik el 24 de Mzo. de 2020
I have no issues helping you, I'm trying to help you narrow down what your specific question is. Currently I have no clue what aspect of this question is causing you problems. Without that the only thing I can do is solving the entire assignment for you, which I think would do you a disservice.
Wahab Ahmad
Wahab Ahmad el 24 de Mzo. de 2020
I have done 10 question Just only 1 that remaining
Ameer Hamza
Ameer Hamza el 24 de Mzo. de 2020
Its my assignment work I didn't know about loop using to make matrix
Precisely the reason we cannot merely give you a solution. The goal of the assignment is to make you learn about creating a matrix using loops, not to ask some stranger on the internet to get it done for you.
Wahab Ahmad
Wahab Ahmad el 25 de Mzo. de 2020
I m done it myself so no need of worry

Respuestas (0)

La pregunta está cerrada.

Preguntada:

el 24 de Mzo. de 2020

Cerrada:

el 20 de Ag. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by