Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
finding simultaneous min of two matrices

Subject: finding simultaneous min of two matrices

From: Dhritiman

Date: 7 Apr, 2009 02:40:03

Message: 1 of 2

Identifying a unique solution to a pair of non linear questions IN X & Y (SUPPOSE IN THEORY i KNOW THEY HAVE A UNIQUE SOLUTION GIVEN SOME PARAMATER VALUES)
I DEFINE AN X GRID AND A Y GRID . I construct two n by n square matrix, one for each equation. Each of these matrices will have more than one element very close to zero (.1^4). They represent different values of x and y which satisfy the equations separately. However I want to find the common row and coloum number (i,j) where the element in each matrix is within a tol(<.1^4).(WHich is the solution to the set of questions) Please help me write a code to identify the unique i and j.

Subject: finding simultaneous min of two matrices

From: Roger Stafford

Date: 7 Apr, 2009 03:15:02

Message: 2 of 2

"Dhritiman " <dhritiman-bhattacharya@uiowa.edu> wrote in message <greee3$mnt$1@fred.mathworks.com>...
> Identifying a unique solution to a pair of non linear questions IN X & Y (SUPPOSE IN THEORY i KNOW THEY HAVE A UNIQUE SOLUTION GIVEN SOME PARAMATER VALUES)
> I DEFINE AN X GRID AND A Y GRID . I construct two n by n square matrix, one for each equation. Each of these matrices will have more than one element very close to zero (.1^4). They represent different values of x and y which satisfy the equations separately. However I want to find the common row and coloum number (i,j) where the element in each matrix is within a tol(<.1^4).(WHich is the solution to the set of questions) Please help me write a code to identify the unique i and j.

  To give a decent solution to this kind of problem, you need a single measure of the "closeness to zero" of a pair of corresponding values from the two matrices. This can be any of a great variety of differently defined "distances" according to your tasttes. It could be the square root of the sum of the squares of their values (L2), the sum of their absolute values (L1), the maximum of their absolute values (L-infinity), or many other possibilities. Once you have selected such a measure, just apply the 'min' function (twice) to find the location of the minimum of such distances.

Roger Stafford

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us