Offsetting Data Though Curve Fitting

If I have a matrix of stress and strain values, how would I shift (add an offset value to) the strain data so that at strain=0 stress=preload. I have different samples of data but I'm not sure how to write a function that would add the offset value. It was suggested that we might use curve fitting or interpolation of multiple samples and then fzero but I'm still confused.

2 件のコメント

Matt J
Matt J 2023 年 10 月 13 日
What is the equation relating stress&strain that you are using? If none, you need to propose one.
Claire
Claire 2023 年 10 月 13 日
Right now I have the following where diameter is set to 40 and height is 15:
function[stress strain] = convert1(displacement,force,height,diameter);
stess = force/(400*pi);
strain = extension/15;
end

サインインしてコメントする。

回答 (1 件)

Matt J
Matt J 2023 年 10 月 13 日

0 投票

If the stress-strain data is all linear elastic (or if you can extract a portion that is), then you could use polyfit:
p=polyfit(strain, stress,1);
youngsModulus=p(1);
offset=p(2);
stress=stress-offset+preload;

2 件のコメント

Claire
Claire 2023 年 10 月 13 日
Okay that makes sense, I guess I'm also confused on where the preload value is coming from?
Matt J
Matt J 2023 年 10 月 13 日
It's coming from you.

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeStress and Strain についてさらに検索

質問済み:

2023 年 10 月 13 日

コメント済み:

2023 年 10 月 13 日

Community Treasure Hunt

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

Start Hunting!

Translated by