I want to load dat file in matlab.
I have already writen this
Can you help me? I want to load this file into an argument in order to continue.
Thanks a lot.

댓글 수: 4

Kevin Holly
Kevin Holly 2021년 10월 16일
An easy way to generate code to import data is to drag the file into the command window, click import data on the tool strip, or use the uiopen command.
This will open up a user interface that will help you import the data. Once you have the desired options selected on how to import the data, you can click the drop down box by the import data button and select Generate Code. This will give you the commands needed to replicate the import. This includes the data output type (e.g. table or matrix) and whether to exclude blank columns and rows or replace blank cells with NaNs.
vasiliki thomopoulou
vasiliki thomopoulou 2021년 11월 4일
Thank you very much for your response, but it is still difficult for me because it shows an error, if i attach you the file, can you write the code that will work?
Mathieu NOE
Mathieu NOE 2021년 11월 5일
hello
this is what i read in my text editor (a bit strange....)
what do you need to import ?
MuMAX: 0.40 ÁíÜðôõîç ìéêñïïñãáíéóìþí 1/day (ðïóïóôü êáôÜ ôï ïðïßï áõîÜíåôáé ç ðïóüôçá ìéêñïïñãáíéóìþí óå ìßá ìÝñá)
Ks: 0.70 ÓôáèåñÜ çìéêïñåóìïý ñýðïõ mg/l
Y: 1.07e8 ÓõíôåëåóôÞò ìåôáôñïðÞò ñýðïõ óå âéïìÜæá: ðëÞèïò êõôôÜñùí áíÜ mg ñýðïõ (TCE)
S0: 250 initial concentration of contaminant (TCE) mg/l
SMCL: 5e-3 Concentration goal of contaminant (TCE) mg/l
Xa: 5e7 ÐëÞèïò êõôôÜñùí áíÜ 1 lt íåñïý áñ÷éêÜ - ãéá ôï ÅÑÙÔÇÌÁ 1
Tgoal: 182.5 Åðéèõìçôüò ÷ñüíïò (days) êáèáñéóìïý ôïõ õäñïöïñÝá - ãéá ôï ÅÑÙÔÇÌÁ2
vasiliki thomopoulou
vasiliki thomopoulou 2021년 11월 5일
Yes the strange part is greek letters :p, i really dont know what to do, the thing is that I only need the firts and second ''column''

댓글을 달려면 로그인하십시오.

 채택된 답변

Sudharsana Iyengar
Sudharsana Iyengar 2021년 11월 5일

0 개 추천

You can try readtable
T=readtable('somefile.dat')

댓글 수: 2

vasiliki thomopoulou
vasiliki thomopoulou 2021년 11월 5일
Thank you very much, i have tried this too, but the professor want the code to run also in octave, and readtable isnt compatible with octave
khushbu khushbu
khushbu khushbu 2023년 9월 7일
Did you get the octave alternative code for this?
Same situation as yours.
It will be great, If you can help.
Thanks

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Data Import and Analysis에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by