Jump to content



Photo
- - - - -

Usage Of Solve Answers And …


  • Please log in to reply
3 replies to this topic

#1 masoodkardorost

masoodkardorost

    Newbie

  • Members
  • Pip
  • 21 posts

  • Calculators:
    classpad300+
    casio4800

Posted 24 February 2008 - 04:01 PM

hello
I want to put the answers of salvation of a statement to different variables

For example I'm writing a program that creates M,K Matrixes and wants to work with them
Matrixes can be n*n
For example the program create M,K 3*3 with these?

[[3000,0,0],[0,2000,0],[0,0,1000]]->M
[[17000,-8000,0],[-8000,15000,-7000],[0,-7000,7000]]->K
DelVar w
K-M*w->e
PrintNatural e,"[K-Mw]"
SetFix 3
Print solve(det(e),w)
.
.
.

The answer will be like this:
{w=1.060,w=6.087,w=13.020}

Now I want to say to program"
1.060->w1
6.087->w2
13.020->w3

What should I do?
The program must recognize that we have n answer and must sort them from min to max and put them in n new variables
For example?
For 1->i to n '(here is 3)
Print i

wi->w (I know it is wrong and program doesn't recognize wi I mean i should change to 1,2,3....like w1,w2,w3,...)


PrintNatural e,"[E]i"

Now I have another problem too
How can I tell the program that

If n=2:Then
Print solve(e[2,1]+e[2,2]*f2i=0,f2i)
DelVar f2
ElseIf n=3:Then
Print solve({e[2,1]+e[2,2]*f2i+e[2,3]*f3=0,e[3,1]+e[3,2]*2i+e[3,3]*f3i=0},{f2i,f3i})
DelVar f2i,f3i
Pause
ElseIf n=4:Then
Print solve(….

n is unspecified and can be even 100
what should I do now?


thanks

#2 masoodkardorost

masoodkardorost

    Newbie

  • Members
  • Pip
  • 21 posts

  • Calculators:
    classpad300+
    casio4800

Posted 05 March 2008 - 07:24 PM

simple question:
what should I do to have the answers of this simple statement ax^3+bx^2+cx+d=0
I want
x1->x1
x2->x2
x3->x3

thanks

#3 Behnoud

Behnoud

    Casio Technician

  • Members
  • PipPipPipPipPipPip
  • 338 posts
  • Gender:Male
  • Location:Iran

  • Calculators:
    CP 300+ OS2.2/
    FX 3600 pv/
    FX 115 s/
    FX 602P

Posted 05 March 2008 - 08:11 PM

I don't know what you want but if you want to to recall the answer,
you can do this:
ans1->x1
ans2->x2
ans3->x3
Btw, try this too:
ans{1,1} and ans{1,2}; note to the difference!

#4 masoodkardorost

masoodkardorost

    Newbie

  • Members
  • Pip
  • 21 posts

  • Calculators:
    classpad300+
    casio4800

Posted 08 March 2008 - 08:56 AM

thanks
ans1,... responds well
But ans{1,1} showed error


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users