• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home ยป Resolved: Convert the struct to double in MATLAB while reading it from CSV file

Resolved: Convert the struct to double in MATLAB while reading it from CSV file

0
By Isaac Tonny on 04/04/2023 Issue
Share
Facebook Twitter LinkedIn

In this post, we will see how to resolve Convert the struct to double in MATLAB while reading it from CSV file

Question:

I would like to read the CSV file in the MATLAB and slice the array.
The link of the same file in CSV format: https://easyupload.io/kku924
I am reading the CSV file using this code in Python:
The shape of df is (4,12)
output:
And I am now able to do these operations:
I want to read the same CSV file using MATLAB so that I am able to perform these operations:
But I couldn’t do it. Can we convert the CSV file to “.mat” and do the same? Or can we read the CSV and slice the matrix in MATLAB itself?

Best Answer:

readtable reads a CSV file and outputs a table object. This is equivalent to a Pandas DataFrame object in Python.
Instead, use readmatrix, which reads a CSV file and outputs a plain numeric matrix.

If you have better answer, please add a comment about this, thank you!

Source: Stackoverflow.com

csv mat matlab python
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: How to stop a thread that has a blocking function from easygui in python

05/04/2023

Resolved: Removing null keys from a json array of objects

05/04/2023

Resolved: How can I generate at compile-time a separate OpenAPI Swagger.json file for each Controller in my ASP.NET project?

05/04/2023

Comments are closed.

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.