MCQs on File Handling and Data Import/Export | MATLAB

Master File Handling and Data Management: Optimize Data Workflow Learn efficient file handling and data import/export techniques, including advanced file formats, binary operations, preprocessing, cleaning, and managing large datasets. Unlock streamlined solutions for data-driven projects.

File Handling and Data Import/Export – Multiple Choice Questions1. Advanced File Formats (CSV, HDF5, JSON)
  • Which MATLAB function is commonly used to read CSV files?

    • A. freadB. readtableC. importdataD. jsondecode

    To save a MATLAB table to a CSV file, which function is used?

    • A. saveB. writetableC. writecsvD. csvwrite

    What file format is most suitable for hierarchical data storage?

    • A. CSVB. HDF5C. TXTD. XLSX

    The function to write data into an HDF5 file is:

    • A. h5writeB. writehdf5C. savehdfD. hdfwrite

    JSON files are primarily used for:

    • A. Large numerical datasetsB. Key-value pair data exchangeC. Image processingD. Encrypted file storage

    To decode JSON data into MATLAB structures, you use:

    • A. jsonreadB. jsondecodeC. readJSOND. decodejson
  • 2. Reading and Writing Binary Files

    1. Which function is used to open a file in binary mode?

      • A. fopenB. freadC. fcloseD. fwrite

      To read binary data from a file, you use:

      • A. fopenB. freadC. fwriteD. fprintf

      What does the fseek function accomplish in file handling?

      • A. Reads dataB. Moves the file position indicatorC. Closes the fileD. Writes data

      Which of the following modes is used to open a file for both reading and writing in binary format?

      • A. 'r+'B. 'w+'C. 'rb+'D. 'wb+'

      Binary files are typically preferred over text files because they:

      • A. Are human-readableB. Allow faster processing and smaller file sizesC. Use ASCII encodingD. Require no additional software

      To write an array as binary data, the function used is:

      • A. fprintfB. fwriteC. saveD. dlmwrite

    3. Data Preprocessing and Cleaning

    1. What MATLAB function removes missing values from data?

      • A. rmmissingB. isnanC. fillmissingD. replace

      The function fillmissing is used to:

      • A. Replace missing values with specified valuesB. Identify missing valuesC. Remove outliersD. Sort data

      Outlier detection can be performed using:

      • A. isnanB. fillmissingC. isoutlierD. replace

      To standardize data for preprocessing, which function is most appropriate?

      • A. normalizeB. meanC. fillmissingD. std

      Which MATLAB function identifies duplicate rows in a table?

      • A. uniqueB. findC. removedupsD. duplicaterows

      The process of transforming categorical data into numerical values is called:

      • A. NormalizationB. One-hot encodingC. PreprocessingD. Label encoding

    4. Handling Large Datasets

    1. What is a common method to handle large datasets efficiently in MATLAB?

      • A. Load all data at onceB. Use tall arraysC. Split data manually into chunksD. Use only CSV files

      The datastore function is used to:

      • A. Handle file I/O errorsB. Access and process large datasetsC. Create backup filesD. Perform database queries

      Which of the following supports memory-efficient operations on large datasets?

      • A. tablesB. arraysC. tallD. structs

      The mapreduce function is best suited for:

      • A. Creating plotsB. Parallel processing of large datasetsC. Reading JSON filesD. Managing binary data

      To preview a part of a large dataset without loading it entirely, you use:

      • A. headB. previewC. subsetD. chunk

      When working with large text files, MATLAB recommends:

      • A. Using readlinesB. Using fgetsC. Loading all data into memoryD. Writing custom file parsers

      To optimize computations with large matrices, you should consider:

      • A. Converting to sparse matricesB. Storing matrices in binary formatC. Parallelizing operationsD. All of the above

      What is the advantage of using parfor with large datasets?

      • A. Interactive plottingB. Parallelized loop executionC. Automatic data cleaningD. Simplified file I/O

      Which of the following can handle distributed computing across clusters?

      • A. mapreduceB. datastoreC. tallD. parcluster

      To convert a dataset into a chunked, memory-efficient format, you use:

      • A. tallB. chunkdataC. datastoreD. partition

      The gather function is used to:

      • A. Save tall arraysB. Bring distributed data back into memoryC. Sort datasetsD. Delete temporary data

      Which toolbox is commonly used to handle large datasets in MATLAB?

      • A. Optimization ToolboxB. Parallel Computing ToolboxC. Statistics ToolboxD. Signal Processing Toolbox

    Answers TableQnoAnswer (Option with Text)1B. readtable2B. writetable3B. HDF54A. h5write5B. Key-value pair data exchange6B. jsondecode7A. fopen8B. fread9B. Moves the file position indicator10C. 'rb+'11B. Allow faster processing and smaller file sizes12B. fwrite13A. rmmissing14A. Replace missing values with specified values15C. isoutlier16A. normalize17A. unique18B. One-hot encoding19B. Use tall arrays20B. Access and process large datasets21C. tall22B. Parallel processing of large datasets23B. preview24A. Using readlines25D. All of the above26B. Parallelized loop execution27A. mapreduce28A. tall29B. Bring distributed data back into memory30B. Parallel Computing Toolbox

    Use a Blank Sheet, Note your Answers and Finally tally with our answer at last. Give Yourself Score.

    X
    error: Content is protected !!
    Scroll to Top