So lets say I have 2 matrices A and B. I need to solve 2 eqns involving specific elements of each matrix.(adsbygoogle = window.adsbygoogle || []).push({});

e.g. A(1)+B(2)=4; A(1)-B(2)=2.

Is there any way to do this? My efforts with Fsolve and solve have failed.

Here's what I've done so far:

function F=myfun(A,B)

F=[A(1)-B(2)-2;

A(1)+B(2)-4];

end

In the command window I typed:

>>A=ones(2,2);

>> B=ones(2,2);

>> [A,B]=fsolve(@myfun,A,B)

I even tried

[A(1),B(1)]=fsolve(@myfun,A(1),B(1))

Neither attempt worked.

**Physics Forums - The Fusion of Science and Community**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Solving equations involving specific elements of matrices in MATLAB?

Tags:

Loading...

Similar Threads - Solving equations involving | Date |
---|---|

Matlab Solving equation with integration using MATLAB | Aug 4, 2017 |

Solving system of equations Mathematica | Apr 3, 2017 |

Mathematica Solving recurrence equations in QM tunneling example | Mar 9, 2017 |

Is there a program to solve any equations? | Feb 24, 2016 |

Solving a complex equation involving conjugates with Mathematica | Apr 19, 2010 |

**Physics Forums - The Fusion of Science and Community**