How to make column vector from existing column vector

6 ビュー (過去 30 日間)
MICHAEL
MICHAEL 2023 年 9 月 25 日
コメント済み: Dyuman Joshi 2023 年 9 月 25 日
I have a data file of tensile force, time and displacement. I would like to create a new vector of a defined amount of elements from the existing values. For example, If from the first plot of stress v strain I identify that the yeild point is at near the 1000th element I want to create a new column vector Stress_zoomed that would contain elements 1 to 1000. Can anyone tell me how I do this? For context I need to do this because at some point I will integrate the value of just the elastic portion of my values.
Attached is the code I have so far.
clear;clc;
T = readtable('s3g2_tensile_test_1.csv','NumHeaderLines',9);
Time= table2array(T(:,1));
Force= table2array(T(:,2));
Displacement= table2array(T(:,3));
Optical= table2array(T(:,4));
Mechanical= table2array(T(:,5));
Wo=.509
wf=.509;
to=.482;
tf=.480;
Lo=2.498;
Lf=2.551;
G=1.016;
Ao=Wo*to;
Af=wf*tf;
A_delta=.0529;
Stress=Force/Ao;
Strain=((Lo+Optical)-Lo)/Lo;
plot(Strain, Stress)
  1 件のコメント
Dyuman Joshi
Dyuman Joshi 2023 年 9 月 25 日
Simple indexing should do -
%Let yP be the element that is the nearest to the yield point
Stress_zoomed = stress(1:yP)

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

採用された回答

Star Strider
Star Strider 2023 年 9 月 25 日
Perhaps create a second table.
Tzoomed = T(1:1000,:)
Then refer to it as you would the original ‘T’ with respect to its variables.

その他の回答 (0 件)

カテゴリ

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

製品


リリース

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by