How can I create it?
    4 views (last 30 days)
  
       Show older comments
    
    Taner Cokyasar
 on 12 Feb 2016
  
    
    
    
    
    Commented: Star Strider
      
      
 on 12 Feb 2016
            How can I create a 5x5 matrix with the following criterion: aij = 2cos(0.4(i-j)π)
0 Comments
Accepted Answer
  Star Strider
      
      
 on 12 Feb 2016
        A bit more efficiently, using meshgrid:
[i,j] = meshgrid(1:5);
a = 2*cos(0.4*(i-j)*pi);
2 Comments
  Star Strider
      
      
 on 12 Feb 2016
				My pleasure!
The meshgrid function can make a number of matrix calculations easier.
More Answers (1)
See Also
Categories
				Find more on Data Distribution Plots in Help Center and File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

