PLOT 2D graph and matrices

2 vues (au cours des 30 derniers jours)
Lewis Fer
Lewis Fer le 18 Juin 2021
Commenté : Lewis Fer le 18 Juin 2021
I'm trying to solve this 2D problem in matlab,
for a given matrices (2*2 dimension for example) using the following notations :
A frequency-domain representation of the matrix K
sigma=the maximum singular value of matrix K;
the fist axis is p and the secon axis is s where 1<p<4 and 1<s<4 and
K=[p-1 -2; -3 s-4]
how to ( compute and plot ) the surf that represnt each pair (p,s) the ( sigma=the maximum singular value of matrix K) like this graph ( note that this graph is for a nother example ),
it's mean: the first axis: p, the second axis: s, and the third axis: we have the maximum singular value of matrix K

Réponse acceptée

SALAH ALRABEEI
SALAH ALRABEEI le 18 Juin 2021
You need to define several values of p and s, then find the svds of K for each value of k p and s; See thebexample below
p=1.1:0.1:3.9;
s=p
for i =1:length(p)
for j =1: length(s)
pi = p(i); sj = s(j);
K=[pi-1 -2; -3 sj-4];
M(i,j) = svds(K,1);
end
end
surf(p,s,M)
  1 commentaire
Lewis Fer
Lewis Fer le 18 Juin 2021
thank you so much SALAH!! this is the result I I forgot to use svds command.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange

Produits


Version

R2015b

Community Treasure Hunt

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

Start Hunting!

Translated by