## 10 Reputation

4 years, 130 days

## Fitting variables to matrix eigenvalue s...

Maple

Hi guys,

I'm fairly new to programming as a whole, but I've currently set up a script which creates a matrix and then fills it in given a  condition. i.e if the x and y indices of the matrix are the same it has been told to add m^2F. If the y and x index differs by 3 is has been asked to fill in V3/4 and if they differ by 6 it has been asked to fill in V6/4. After the matrix is created it will then calculate the eigenvalues.

My question is as follows:

m^F is a constant and V3 and V6 are variables. I currently, manually, set a value of V3 and V6 at the top of the script and then calculate the eigenvalues. How would one go about reversing this process - i.e provide a set of eigenvalues and then perform a fit to find the best values of V3 and V6. Is this 'doable' in Maple or would it be best to use something else.

I have attached a copy of the script for viewing purposes in case what I have written is not very clear - Hindered_rotor.mw

David

## Matrix from -x to x as opposed to 1-x???...

Maple

Hi guys,

I'm very new to Maple and I'm trying to get  a 'diagonalisable' matrix set up.

It will help for me to attach what I currntly have for this to make sense:

What I currently have is a way of setting up a 5x5 matrix where it inserts a value at every instance where i=j, i=j+3 and i=j+6.

Currently I can only make this work for value from 1 to x and, for this to work, I basically need to make up a matrix that goes from -x to x

i.e currently I have x = 1 though 5 (5x5) and I need to set it up for x= -5 through 5 (11x11)

Every time I try and get the negative elements and 0 in there it tells me that I can't do it.

Is there any way to do this is Maple and am I going the wrong way about it?

Thanks very much for your time!

 Page 1 of 1
﻿