Sei sulla pagina 1di 4

NosferatuWampir(Mechanical) (OP)

11Jan1006:57

Hi.Iwouldliketocalculateanequationwithvariablesinrangeofvalues(inGivenFindblock),butIhaveproblemwiththat.Letmeexplainonexample
whatI'mtalkingabout.Iwrite:
y=1..4(rangeofvaluesforvariabley)
Given
x(y)=1(initialguess)
x(y)=2*x(y)+1(logicalequation)
r(y)=Find(x(y))
Whenitype"r(y)="Mathcadreportaproblem:"initialguessmustconsistofnumbersandmatrices".Idon'tknowhowexactlyishouldchangetheinitial
guess.Anyidea?Thanksforhelp.

seymours2571(Mechanical)

11Jan1007:33

Initialguesshastobeoutsidethegiven/findblock.Putitjustabovethegivenstatementanditshouldwork.
Steve

NosferatuWampir(Mechanical) (OP)

11Jan1008:53

Itdoesn'tmatterwheretheinitialguessisplacedin,itcanbeaboveorintheGivenFindblock,butItrythatanditisstillnotworking.Butthanksfor
interesting:)Somenewsuggestions?

seymours2571(Mechanical)

11Jan1009:15

Ah..yourright.Ihavealwaysbeundertheimpressionthatguessvalueshadtobeoutsidethesolveblock..Learnedsomethingnewtoday.
Backtoyourproblemthough,couldtheissuebethatyourguessvalueisapparentlyafunctionx(y)=1.

NosferatuWampir(Mechanical) (OP)

11Jan1009:51

Indeed,onmathematicalpointofviewguessvalueofxshouldn'tbeafunctionofvariabley,You'reright.ButwhenIwritex=1,r(y)becomesred("This
variableisundefined"),sotheproblemisstillunsolved.Steve,couldYoutypethistomathcadandtakeacloserlook?Peter.

Occupant(Mechanical)

11Jan1010:36

Howdoyouevaluteafunctionlikethatwhereitsoutputdependsonusingthefunctionastheinput?

NosferatuWampir(Mechanical) (OP)

11Jan1011:22

Readmylastpost.Itwasmistake,Ichangedthat,sonowinitialvalueofxisn'tafunctionofy.Programstilldoesn'twork.

Occupant(Mechanical)
You'remissingmypoint.Lookattheattachedpicture.

http://files.engineering.com/getfile.aspx?folder=d02518307a4f4208a09963

11Jan1012:29

http://files.engineering.com/getfile.aspx?folder=d02518307a4f4208a09963

IRstuff(Aerospace)

11Jan1012:46

Yourconstructmakesnosensereplacex(y)withblah
blah=2*blah+1blah=1always

TTFN
FAQ731376:EngTips.comForumPolicies

NosferatuWampir(Mechanical) (OP)

11Jan1014:45

Sorry,mistakeinrewritingfrommathcad.Theprogramis:
y=1..4(rangeofvaluesforvariabley)
Given
x=1(initialguess)
y(x)=2*x(y)+1(logicalequation)
r(y)=Find(x(y))
Howaboutthat?

NosferatuWampir(Mechanical) (OP)

11Jan1014:50

Damn,anothererror.Correctform:
y=1..4(rangeofvaluesforvariabley)
Given
x=1(initialguess)
y=2*x(y)+1(logicalequation)
r(y)=Find(x(y))
Somebodyknowwhatiswrongwiththis?

IRstuff(Aerospace)
>InitialguessMUSTbeoutsideofthegivenfindblock
>YoucannotplaceanundefinedfunctionontherighthandsideofANYdefinitionorconstraint
>Inyourspecificexamplex(y)shouldsimplybex

11Jan1015:09

>However,ourconstructhasaclosedformsolutionoftheapparentfunctioninversionthatyouappeartobelookingfor,soagivenfindisarathertedious
wayoffindingtheanswer,andwillnotgiveyouthefunctionalrelationship,inanycase:
x=(y1)/2
ThisisthetypeofproblemthatyoucouldthesymbolicfunctionalityofMathcad,asopposedtothenumericalfunctionality.
TTFN
FAQ731376:EngTips.comForumPolicies

NosferatuWampir(Mechanical) (OP)

11Jan1016:29

OK,buttheprogramthatItypedisonlythesimplestexamplewithwhatIhaveaproblem.I'msolvingmorecomplicatedengineeringproblem,withone
variable,multipleequationsandmultipleunknowns,moreoveritrequiressequentialiterationtechnique.Thevariablerangeofvaluesisalsolarger.I'm
tryingtowritethesimlpestanalogicalprogramethatworks,andrelyonthisI'llmakeachangesintheproperone.Essenceisthesame.IhopeYou
understandme.Sorryforanypossiblesyntaxerrors,I'mnotanenglishman.

excognito(Aerospace)

11Jan1016:32

That'sprobablynottheformyouwant.Youappeartobeusingxasbothafunctionandascalar,fromaMathcadperspective.Try

Given
y:=1(initialguessy)
x:=1(initialguessx)
y=2*x+1(logicalequation)(relation)
r(y)=Find(x)
then
y:=1..4(rangeofvaluesforvariabley)
r(y)=

PNachtwey(Electrical)

11Jan1018:29

Theproblemdoesn'tmakesenseasstated.r(y)isknownatfourlocationsthenthecoefficientsfora3rdorderpolynomialcanbefound.Thegeneralform
ofthefunctionr(y)stillneedstobeknown.
Whatdoesxhavetodowiththis?
PeterNachtwey
DeltaComputerSystems

http://www.deltamotion.com

jghrist(Electrical)

12Jan1012:01

Ithinkexcognitohasitfiguredout.Youcouldeliminatetheguessvaluesaltogetherandgetasymbolicsolutionbytyping[Ctrl][.]aftertheFind(x)toget
thesymbolicresult
r(y)=y/21/2
SeeQuicksheetsSolvingEquations,SymbolicSolutionsofEquations.

Potrebbero piacerti anche