cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

how can i get the value of matrix by the trace function in program debugging

赵亚军
1-Newbie

how can i get the value of matrix by the trace function in program debugging

i want to trace the independent variables,and it's a matrix,when i use the tace function in program debugging,it can display only some elements,not all of the elements are displayed.i hvae seeked the help and quicksheet,but no answer. so i upload the picture,wishing for your help.

trace.png

as you see,the variable is a matrix{9,9},it only displays some of 81elements,can i know the value of all the elements?

13 REPLIES 13

Try it to work with the built-in function "submatrix(A, ir, jr, ic, jc)".

i tried,but failed.

trace(1,9).png

the same problem,not all the elements.i know a way,trace every element,but it's too complex,

RichardJ
19-Tanzanite
(To:赵亚军)

Why do you want to see the matrix every iteration? What is it going to tell you?

Actually,the worsheet i have posted before is an example of parts of my work,later,i'll give more parameters and more experimental points,maybe up to 2000 parameter and 40000 experimental points, do you think it is possible that my work can achieve.i doubt it

the biggest problem is the time,maybe i can get a low-precision result(not the global optimum,big TOL and CTOL),at least,i do get the result.so,i have to solve the problem of time.

i have traced the value of the objective function,and found that it changes very little after some big changes.for example,see attached,trace 4.txt


now,i want to stop the calculation and get the value of parameter when i think that value of the objective function changes very little,that can save a lot of time.

but when i stop the calculation,the trace window can't dispaly all the value.

键 张 wrote:

...the biggest problem is the time,maybe i can get a low-precision result(not the global optimum,big TOL and CTOL),at least,i do get the result.so,i have to solve the problem of time...


Can you attach this worksheet to the message?

thanks

RichardJ
19-Tanzanite
(To:赵亚军)

Actually,the worsheet i have posted before is an example of parts of my work,later,i'll give more parameters and more experimental points,maybe up to 2000 parameter and 40000 experimental points, do you think it is possible that my work can achieve.i doubt it

Not the way you are approaching it now, no. You would need to break the problem up somehow into smaller chunks of data and/or parameters. Or splash a couple of billion dollars on a nice supercomputer

i have traced the value of the objective function,and found that it changes very little after some big changes.for example,see attached,trace 4.txt

Yes. It takes big steps when it is a long way from the minimum, and smaller steps as it aproaches.

now,i want to stop the calculation and get the value of parameter when i think that value of the objective function changes very little,that can save a lot of time.

That's what changing TOL/CTOL will do.

i see a new method in prime 2.0.

http://www.ptc.com/appserver/wcms/relnotes/note.jsp?&icg_dbkey=826&im_dbkey=132718

do you think it can help?

键 张 wrote:

...

http://www.ptc.com/appserver/wcms/relnotes/note.jsp?&icg_dbkey=826&im_dbkey=132718

...

"The optimization solvers in Mathcad Prime 2.0 are from the advanced KNITRO 7.0 optimization software library".

RichardJ
19-Tanzanite
(To:赵亚军)

do you think it can help?

No. For minerr it will not even use the new solvers unless the existing LM algorithm fails.

i have found the function :APPENDPRN("", a), not the trace windowQQ截图未命名.png

键 张 wrote:

i have found the function :APPENDPRN("", a), not the trace window...

What you mean?

that function can save the value of independent variables in each iteration,including the case that independent variable is a vector or a matrix.

the trace window can't display all the elements of a matrix.

Top Tags