stress = Ck45(:,1); strain = Ck45(:,2); plot(strain,stress); I am plotting a stress strain curve but the curve is not starting from zero so my professor told me to shift he curve but for that I must subtract the 1st-1st element 2nd -1st element so on

1 回表示 (過去 30 日間)
Prateek Srivastava
Prateek Srivastava 2017 年 5 月 18 日
コメント済み: KSSV 2017 年 5 月 19 日
stress = Ck45(:,1); strain = Ck45(:,2); plot(strain,stress);the curve for this is not starting from zero and I need to shift it to zero .how can i write a code where I can subtract 1st element from 1st and than second from first and so on.. of the same matrices to create a new set of matrices.

回答 (1 件)

KSSV
KSSV 2017 年 5 月 18 日
To shift a array to zero, you can substract the array with minimum value of the array.
strain = strain- min(strain);
If you want to substract successive elements you can use either diff or gradient
  2 件のコメント
Prateek Srivastava
Prateek Srivastava 2017 年 5 月 18 日
excellent and mindblowing it really helped me in getting my work done.thanks a lot brother.
KSSV
KSSV 2017 年 5 月 19 日
Thanks is accepting the answer.......

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

カテゴリ

Help Center および File ExchangeStress and Strain についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by