-
FlexPro
- Auf einen Blick
- Features & Optionen
- Einsatzgebiete
- Alle Vorteile
- Neu in FlexPro 2021
- FlexPro gratis testen
- FlexPro View OEM Freeware
- Kaufberatung
- Login
- Language
- +49 6894 929600
- infoweisang.com
- Google Maps
- Produkte
- News
- Support
- Unternehmen
- Jobs
- Kontakt
- Login
- Language
- +49 6894 929600
- infoweisang.com
- Google Maps
Import from PowerLab via MatLab
- Dieses Thema hat 6 Antworten sowie 2 Teilnehmer und wurde zuletzt vor vor 19 Jahren, 1 Monat von paulwarshawsky@yahoo.com aktualisiert.
-
AutorBeiträge
-
November 4, 2005 um 7:13 am Uhr #12657paulwarshawsky@yahoo.comMitglied
I have two data acquisition systems – one from AstroMed for which I use FlexPro for analysis and the second from ADInstruments, a PowerLab system. I would like to do most of my analysis with FlexPro and am trying to transfer data from the PowerLab format to FlexPro. The PowerLab can export to MatLab format, so I thought this would be a reasonable way to transfer data (PowerLab to MatLab, MatLab to FlexPro). Unfortunately this does not seem to be working for me. Either the exported data is not 100% correctly formatted for MatLab or the import algorithm does not import the data correctly.
These are the problems:
1) The data and “ticktimes” are imported as a data-matrix with n data-series with 1 element each instead of a data-series with n elements
2) The comments are imported as strings with a value of “0”
Ideally the import should create a signal with the appropriate x (ticktimes) and y (data) values. The comments should be converted into markers with the text set to the string of the comments.
I have attached the exported file. As I do not own MatLab I cannot open the exported file to see if it was exported correctly.
Thanks,
Paul Warshawsky
November 4, 2005 um 7:13 am Uhr #8320paulwarshawsky@yahoo.comMitgliedI have two data acquisition systems – one from AstroMed for which I use FlexPro for analysis and the second from ADInstruments, a PowerLab system. I would like to do most of my analysis with FlexPro and am trying to transfer data from the PowerLab format to FlexPro. The PowerLab can export to MatLab format, so I thought this would be a reasonable way to transfer data (PowerLab to MatLab, MatLab to FlexPro). Unfortunately this does not seem to be working for me. Either the exported data is not 100% correctly formatted for MatLab or the import algorithm does not import the data correctly.
These are the problems:
1) The data and “ticktimes” are imported as a data-matrix with n data-series with 1 element each instead of a data-series with n elements
2) The comments are imported as strings with a value of “0”
Ideally the import should create a signal with the appropriate x (ticktimes) and y (data) values. The comments should be converted into markers with the text set to the string of the comments.
I have attached the exported file. As I do not own MatLab I cannot open the exported file to see if it was exported correctly.
Thanks,
Paul Warshawsky
November 4, 2005 um 7:03 pm Uhr #9068Bernhard KantzTeilnehmerThe columns of an Matlab array are equal to the number of data series and the the rows of an Matlab array are equal to the number of values.
If the matrix has only one column FlexPro imports the Matlab matrix as data series.
In your case the matrix has one row and N columns. Therefore the result is a matrix with N data series.But you can convert the matrix ‘Matrix’ into a data series with this FPScript formula:
Dim t t = TransposeMatrix(Matrix) t[0]
In FlexPro 7 you can write
TransposeMatrix(Matrix)[0]
Dezember 1, 2005 um 2:27 am Uhr #9069paulwarshawsky@yahoo.comMitgliedI’m now using FlexPro 7.0 – I have additional problems with importing from MatLab. All string data (titles, units, comtext) seem to be truncated after the first letter! (Again I cannot be sure this is not related to how the data was exported from my the PowerLab software.) It seems to me that the import algorithm should format the data in a usable format automatically! The ticktimes should be transposed and defined to be x-values. Each channel should be transposed, named according to the titles matrix, assigned units according to the units matrix, defined to be a y-value and have the ticktimes assigned as the x-value.
I’m sure I can eventually accomplish all this on my own with VBA, but I think it would be easier to do this as the data is imported.
Is there a way that I can modify the import algorithm? Where would I find it? (I assume it is in VBA)
Thanks,
Paul
Dezember 1, 2005 um 3:00 am Uhr #9070Bernhard KantzTeilnehmerThe Matlab format is a very generic format. So it’s not possible to do the steps automatically you need in your special case.
But you can create your own import filter with VBA. Take a look at the ImportFilter example (ImportFilter.FPD) for a sample import filter of a custom binary format. This example can be modified to fit your needs. Instead of the BinaryDataLink object you can use the MathWorksMATLABDataLink object.
Dezember 2, 2005 um 2:05 am Uhr #9071paulwarshawsky@yahoo.comMitgliedI have verified that the files are being exported to MatLab format correctly. FlexPro is not importing the string data correctly (this issue was not addressed in your previous replies.) Again this means that channel names, unit names and comments are being lost in the import.
I will look into creating my own import filter as you have suggested. Since the output from the PowerLab software uses standardized names, I believe in my specific case it will be possible.
Thanks again,
Paul
Dezember 2, 2005 um 8:06 pm Uhr #9072Bernhard KantzTeilnehmerWe are using the C MAT-File API to import the MAT-files Version 5. We’ve tested the import with a lot of other MAT files with character arrays…
In Matlab you also have to write a program (M-File) which imports your PowerLab Mat-files correctly. Such an M-File can be used to plot the Export Matlab MAT-files with an appearance similar to the display of the original data.
In FlexPro you can do this with VBA. -
AutorBeiträge
- Du musst angemeldet sein, um auf dieses Thema antworten zu können.