Basic equations from excel to matlab?
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposta accettata
Azzi Abdelmalek
il 26 Giu 2015
Modificato: Azzi Abdelmalek
il 26 Giu 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)
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Spreadsheets in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!