need help getting this to run

colum1 = newtestdata(:,1)
colum2 = newtestdata(:,2)
colum3 = newtestdata(:,3)
initial_strain_index = find(colum1 == min(colum1));
% Find the index of the peak stress value in column 3
peak_stress_index = find(colum3 == max(colum3));
% Extract the start and end points of the test
start_point = [colum1(initial_strain_index), colum2(initial_strain_index), colum3(initial_strain_index)];
end_point = [colum1(peak_stress_index), colum2(peak_stress_index), colum3(peak_stress_index)];
%how do i get this to run?

回答 (1 件)

Torsten
Torsten 2024 年 3 月 12 日
編集済み: Torsten 2024 年 3 月 12 日

0 投票

Maybe
initial_strain_index = find(colum1 == min(colum1),'first');
peak_stress_index = find(colum3 == max(colum3),'first');
instead of
initial_strain_index = find(colum1 == min(colum1));
peak_stress_index = find(colum3 == max(colum3));
suffices.

製品

リリース

R2023b

質問済み:

2024 年 3 月 12 日

編集済み:

2024 年 3 月 12 日

Community Treasure Hunt

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

Start Hunting!

Translated by