Got couple of questions from college assignments
2 views (last 30 days)
Show older comments
1.Assume matrix MX contains a single non-zero value. Place the row number containing this non-zero value into NZR and the column value in NZC
2.Assume Matrix Mz has already been defined. Place the row numbers of all elements in Mz that are negative into vector MzRN and the corresponding column numbers into MzCN
Both answers need to be answered in a single statement
0 Comments
Accepted Answer
Stephen23
on 9 Apr 2017
doc find
2 Comments
Stephen23
on 9 Apr 2017
Edited: Stephen23
on 9 Apr 2017
- Start MATLAB.
- Type doc find in the command window.
- Press the enter key.
- Read the help page that will open up: this is the help of the one function that you will need to use.
- Read the help again: notice that it has different options and outputs.
- Read the help again: start to think about how it could be used to solve your task.
- Now practice. Learning to solve problems also involves practice (and making mistakes, but that is okay!).
- If something does not work as you expect do not complain that MATLAB is broken: read the help again.
- Check the output by hand: does it really do what you want?
- Try it with the task that the assignment gives you.
Is that specific enough?
You will not learn how to solve programming problems if I tell you the answer and show you the code. This task is very simple, and I already told you the exact function that you need to use. Your task is to take the initiative, do some reading, learn something new, and try it out yourself. Then you will learn something. You should also do these introductory tutorials (which are highly recommended for all beginners):
And read this:
Good luck and have fun learning and practicing!
PS: on this forum it is discouraged doing people's homework for them. I personally will do your homework for you on two conditions:
- You get explicit permission from the course tutor/professor.
- I get the course credits for any work that I do.
PPS: Handing in someone else's work as your own is called plagiarism.
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!