In terms of performance, is it faster to read input from a file, or is it faster to write to a file? I am trying to calculate some things and was wondering if it is more efficient to make changes to a file and have the program read and store the data, or more efficient to create a menu in the program and prompt the user for input, and write that data into a file along with the results of the calculation.

답변 (1개)

Walter Roberson
Walter Roberson 2016년 10월 17일

0 개 추천

reading is faster than writing for all devices I know of.
However, user convenience and understanding needs to be taken into account. Having a program that knows what to change and where is a more usable program than one that relies on the user known how to edit the file correctly.

카테고리

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

질문:

2016년 10월 17일

답변:

2016년 10월 17일

Community Treasure Hunt

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

Start Hunting!

Translated by