Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Is there a easy way to call on the minor of a matrix?

Posted on 2010-11-28
1
Medium Priority
?
641 Views
Last Modified: 2013-11-25
Given an nxn matrix, I want to call on the n/3Xn/3 (assume n divisible by 3) matrix appearing in the center so that I can change its elements to zeros. For example, if I had a 6x6 matrix A, I would want to change the entries A(15), A(16), A(21), A(22) to zeros.
0
Comment
Question by:Mario271
1 Comment
 
LVL 2

Accepted Solution

by:
Eyal-f earned 2000 total points
ID: 34226400
How about this:

A is your matrix.

k=(n-n/3)/2+1;
A(k:(n-k+1),k:(n-k+1))=0;
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Navigation is an important part of web design from a usability perspective. But it is often a pain when it comes to a developer’s perspective. By navigation, it often means menuing. This is less theory and more practical of how to get a specific gro…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
Suggested Courses

926 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question