How do I make my symbolic function into a matrix?
Mostra commenti meno recenti
I have the following function:
Grow= 1/(15.69892467*(2*3.14159).^.5)*(2.82718).^(-(.5*((y-(.879*x+5.682))/15.69892467).^2))
where I defined x and y using syms x y
The graph represents the growth kernel of an integral projection model for a grass species. I can graph it just fine using mesh(x,y,Grow, [1, 500]) but now I need to make a matrix of the data so that I can find the eigenvalues and eigenvectors.
I want the matrix to be a square matrix that represents the different combination of x and y values. So row one would be the solution to the equation when y=1 and x = 1, 2,...to 500 and row 2 would be y=2, x=1,2... to 500 etc. I'd like to make a 500 by 500 matrix.
I would appreciate any advice you can give me. I have the feeling this should be a simple operation but I can't figure it out. I tried making two vectors x and y but because of the nature of matrix subtraction, I just ended up with another vector.
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Code Performance in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
