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.
回答(1 个)
Matt J
2023-10-13
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;
类别
在 帮助中心 和 File Exchange 中查找有关 Stress and Strain 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!