I wanna ask if anyone can help , I have a non linear graph , which I want to make it linear can I do it using Matlab

1 回表示 (過去 30 日間)
Abderezak
Abderezak 2022 年 6 月 2 日
回答済み: Sam Chak 2022 年 6 月 3 日
my graph looks like a random graph , it's totally non linear , so how can I make it linear for processing it .

回答 (2 件)

Michael Van de Graaff
Michael Van de Graaff 2022 年 6 月 3 日
plot(sort(data))

Sam Chak
Sam Chak 2022 年 6 月 3 日
Since you didn't provide the data for the random-looking graph, this maybe not what you are looking for, but it is a very simple example for turning a nonlinear graph into a linear one.
x = -10:0.1:10;
y = x.^2;
X = log(x);
Y = 2*X;
subplot(2,1,1)
plot(x, y, 'linewidth', 1.5)
grid on
xlabel('x')
ylabel('y')
title('y = x^2')
subplot(2,1,2)
plot(X, Y, 'linewidth', 1.5)
grid on
xlabel('log(x)')
ylabel('log(y)')
title('log(y) = 2*log(x)')

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by