Basic equations from excel to matlab?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Sha S
am 26 Jun. 2015
Kommentiert: Sha S
am 26 Jun. 2015
Hi, I am a new matlab user. I have created equations on excel based on a data file. I have been able to successfully import this file into matlab and now I would like to use these same equations in matlab so that data processing will be quicker for each file. Each file has the same exact # of columns and a different number of rows.
This is one of the equations I have used on excel:
=((CI2+DP2)/2)+(0.4095*((DV2-(3.44/2))-((CI2+DP2)/2)))
This equation will be the same for each data file and it will be used for each row in the file. I realize that in matlab when I imported the file the columns changed into numbers rather than letter, sooo... CI= column 87, DP= column 120, DV= column 126.
Does anyone know how I would go about using this equation in matlab?
0 Kommentare
Akzeptierte Antwort
Azzi Abdelmalek
am 26 Jun. 2015
Bearbeitet: Azzi Abdelmalek
am 26 Jun. 2015
If A is your matrix
A=rand(4,130), % Example
CI= 87,
DP=120,
DV=126
out=A(:,CI)+A(:,DP)/2+0.4095*(A(:,DV)-3.44/2)-(A(:,CI)+A(:,DP)/2)
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Data Import from MATLAB finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!