Indexing in for loop

Indexing in for loop - Messages

#1 Posted: 8/16/2023 11:24:25 AM
Oichi

Oichi

3 likes in 35 posts.

Group: User

Hello Smath community, I have a problem that I can't fix. In this worksheet I want to create a matrix "R" that contains the roots of a polynomial for different values of the parameter "w". I created a for loop that should be able to do this but I dont know how to index inside the for loop for different columns of "R" (Each column should be the roots for each value of the parameter).eigen.sm (10 KiB) downloaded 50 time(s).
#2 Posted: 8/16/2023 5:30:53 PM
Oscar Campo

Oscar Campo

124 likes in 298 posts.

Group: Moderator

Hi,
Here a solution:
Captura.PNG

I must modifiy your file for show the solutions on each column of matrix R.
Please check yourself the math:

eigen~modified.sm (16 KiB) downloaded 50 time(s).
#3 Posted: 8/17/2023 10:36:38 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Companion matrix associated with Eigen code.

Maths eigenAll Companion.sm (63 KiB) downloaded 52 time(s).
#4 Posted: 8/18/2023 10:25:53 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

Please check yourself the math:


Polynomials explorer added.
Originator ... Please confirm your project works.
Cheers ... Jean.

eigen_modified.sm (39 KiB) downloaded 49 time(s).

#5 Posted: 10/6/2023 11:06:19 AM
Oichi

Oichi

3 likes in 35 posts.

Group: User

Thank you all for help !! and sorry for the late reply, yes your solutions are working ^^
  • New Posts New Posts
  • No New Posts No New Posts