Generating equations from MATLAB data

Hello, I have 4 arrays of size [1 x 1500]. Say,
H1 = [h11 h12 h13 ..... h1_1500];
H2= [h21 h22 h23 ..... h2_1500];
H3 = [h31 h32 h33 ..... h3_1500];
H4 = [h41 h42 h43 ..... h4_1500];
I have to create four equations from these arrays. This is the output of the four hall sensors (ratuiometric). The plot of these arrays wrt to independent variable (which is position of magnet) looks like sinusoidal waveforms. I have attached the data i extracted in CSV format. the independent variable is the position from 0 - 1505.
Can anybody help me with this?

 採用された回答

David Hill
David Hill 2022 年 2 月 16 日

0 投票

y=load('Hall_1_new.csv');
x=1:1505;
f=fit(x',y','fourier5');
plot(x,y);
hold on;
plot(f);

1 件のコメント

Toshi Sharma
Toshi Sharma 2022 年 3 月 1 日
It worked for me Thanks!

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

その他の回答 (1 件)

Toshi Sharma
Toshi Sharma 2022 年 2 月 16 日

0 投票

Hi David,
Really Thanks!
For now it is working. I will test the equations in real time. And I will post the update, if it works precisely for me.

カテゴリ

ヘルプ センター および File ExchangeMathematics についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by