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?

 Respuesta aceptada

David Hill
David Hill el 16 de Feb. de 2022
y=load('Hall_1_new.csv');
x=1:1505;
f=fit(x',y','fourier5');
plot(x,y);
hold on;
plot(f);

Más respuestas (1)

Toshi Sharma
Toshi Sharma el 16 de Feb. de 2022

0 votos

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.

Categorías

Más información sobre Mathematics en Centro de ayuda y File Exchange.

Preguntada:

el 16 de Feb. de 2022

Comentada:

el 1 de Mzo. de 2022

Community Treasure Hunt

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

Start Hunting!

Translated by