How to make the following shape in Matlab

1 回表示 (過去 30 日間)
Med Future
Med Future 2022 年 5 月 31 日
編集済み: Sam Chak 2022 年 5 月 31 日
Hello, I hope you are doing well. i Have attached the two files, i want to create the similar plot using Matlab
How can i do that?
  15 件のコメント
Walter Roberson
Walter Roberson 2022 年 5 月 31 日
Each of the pulses is slightly non-symmetric, some more obviously than others. Some are nearly the reverse of others.
The non-symmetry might possibly indicate that the pulse is symmetric but not sampled exactly symmetrical around the axis of symmetry.
Walter Roberson
Walter Roberson 2022 年 5 月 31 日
編集済み: Walter Roberson 2022 年 5 月 31 日
The second pulse is roughly
p = [-1024/5, 7168/5, -12544/5]
x = linspace(3+3/16,3+13/16,32);
y = polyval(p, x);
plot(x, y)
daspect([1/2,5])

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

回答 (1 件)

Sam Chak
Sam Chak 2022 年 5 月 31 日
編集済み: Sam Chak 2022 年 5 月 31 日
Edit: Make good use from @Walter Roberson's polynomial regression model of the second pulse from the OP's second image.
First Figure
s = [0 4 8]
p = [-1024/5, 7168/5, -12544/5];
for j = 1:length(s)
x(j, :) = linspace(s(j)+3/16, s(j)+13/16, 32);
y(j, :) = polyval(p, x(j, :)-(s(j)-3));
plot(x(j, :), y(j, :), 'linewidth', 1.5)
hold on
end
hold off
grid on
xlabel('s')
ylabel('PA')
Second Figure:
s = [0 3 4 7]
p = [-1024/5, 7168/5, -12544/5];
for j = 1:length(s)
x(j, :) = linspace(s(j)+3/16, s(j)+13/16, 32);
y(j, :) = polyval(p, x(j, :)-(s(j)-3));
plot(x(j, :), y(j, :), 'linewidth', 1.5)
hold on
end
hold off
grid on
xlabel('s')
ylabel('PA')
  4 件のコメント
Med Future
Med Future 2022 年 5 月 31 日
Sam Chak
Sam Chak 2022 年 5 月 31 日
編集済み: Sam Chak 2022 年 5 月 31 日
Edit: Guessing the correct math functions without any useful info or unique features is like searching a needle in a haystack. Since you are unable to provide the data points, I guess this indefinite problem is beyond my capability. Good luck!

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

カテゴリ

Help Center および File ExchangeAnnotations についてさらに検索

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by