Azzera filtri
Azzera filtri

Solving Matrix functions with a function

3 visualizzazioni (ultimi 30 giorni)
Lorcan Conlon
Lorcan Conlon il 8 Set 2020
Modificato: Bruno Luong il 8 Set 2020
There may be no easy answer to this question but I thought I should try. I have a function, call it f(x), where x is a vector of dimensions 48 x 1, i.e. the function f takes as its input 48 variables and produces as its output an 8x8 matrix. I have another specified 8x8 matrix, lets call it A, which I wish to produce via the function f. Is there a way which matlab can solve this efficiently? i.e can matlab tell me what x vector is needed so that f(x)=A?
Even a simple example of this for 4x4 matrices would be useful
Thanks!

Risposte (1)

Bruno Luong
Bruno Luong il 8 Set 2020
Modificato: Bruno Luong il 8 Set 2020
x0 = zeros(48,1);
xA = lsqnonlin(@(x) f(x)-A, x0)

Categorie

Scopri di più su Operating on Diagonal Matrices in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by