- The eigenvector is plotted directly, where the index of each element is automatically used for the x-axis with markers (‘*’) connected by lines (‘-’).
 
ploting 1D eigenvector using ffmatlib
    6 visualizzazioni (ultimi 30 giorni)
  
       Mostra commenti meno recenti
    
I want to know is there any way to plot 1d eigenvector in MATLAB.
I am exporting the matrices from freefem++ and solving them for eigen value using eigs in MATLAB
I want to plot eigenvectors using ffdeplot but apparently all the functions in ffmatlib library is for 2D or 3D problem
0 Commenti
Risposte (1)
  AKennedy
      
 il 4 Feb 2025
        Yes, you can plot a 1D eigenvector in MATLAB. Since the eigenvector is 1D, you can simply use the “plot” function to visualize it. Here are two examples you may refer to, 
% Generate a 1D eigenvector 
eigenvector = [1; 2; 3; 4; 5]; 
% Plot the eigenvector 
plot(eigenvector,'*-') 
2. We explicitly create x-axis values using the “length” function and plot the eigenvector as a line plot, with markers ('o') connected by lines ('-'). 
% Example 1D eigenvector 
eigenvector = [0.2, 0.5, 0.8, 0.9, 1.0, 0.9, 0.8, 0.5, 0.2]; 
% Create x-axis values 
x = 1:length(eigenvector); 
% Plot eigenvector as a line plot 
plot(x, eigenvector, 'o-'); % 'o-' for markers and lines 
xlabel('Index'); 
ylabel('Eigenvector Value'); 
title('1D Eigenvector Plot'); 
grid on; 
FYI: 
0 Commenti
Vedere anche
Categorie
				Scopri di più su Graphics Objects 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!