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?

 Akzeptierte Antwort

David Hill
David Hill am 16 Feb. 2022

0 Stimmen

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

Weitere Antworten (1)

Toshi Sharma
Toshi Sharma am 16 Feb. 2022

0 Stimmen

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.

Kategorien

Mehr zu Get Started with Curve Fitting Toolbox finden Sie in Hilfe-Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by