problems with norm()

조회 수: 4 (최근 30일)
Barbara Schläpfer
Barbara Schläpfer 2020년 12월 8일
답변: Manvi Goel 2020년 12월 14일
Hi
I am trying to calculate the cost for my optimization of two graphs.
For have implied a cost funciton, but even if my values are pretty small, the value of my cost function is very big. Any tips or suggestions why that happens?
cost = norm(experimental_force_interp - abaqus_force) / lenght(abaqus_force);
  댓글 수: 2
dpb
dpb 2020년 12월 8일
Either the difference is large or the force is small, one.
Mayhaps there's one observation very near zero that is the culprit overall?
Standardizing data can often help; without knowing a whole lot more about the problem it's not really feasible to have much else to suggest that might be pertinent.
David Goodmanson
David Goodmanson 2020년 12월 8일
Barbara,
there is no substitute for actually seeing the data:
n = length(abaqus_force);
plot(1:n, experimental_force_interp, 'o-', 1:n, abaqus_force, 'o-')
grid on
Here the 'o-' options are so that no point in an unobvious place gets missed. If the o markers are too dense the options can be dropped.

댓글을 달려면 로그인하십시오.

답변 (1개)

Manvi Goel
Manvi Goel 2020년 12월 14일
The reason for a bigger value of cost function could be wither a higher difference in experimental_force and abaqus_force or very small denominator, i.e., length of abaqus_force.

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by