Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Typo fix for the variable name.
  • Loading branch information
mserkantan authored Oct 4, 2022
1 parent 2ae6947 commit 3c4ba55
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ Read a ``.mat`` file
matioCpp::File input("input.mat");
// You can check if input is open with the isOpen() method
matioCpp::CellArray cellArray = input.read("cell_array").asCellArray(); //Read a Cell Array named "cell_array"
matioCpp::Element<double> doubleVar = cellMatrix({1,2,3}).asElement<double>(); //Get the element in the cell array at position (1,2,3) (0-based), casting it as a double Element
matioCpp::Element<double> doubleVar = cellArray({1,2,3}).asElement<double>(); //Get the element in the cell array at position (1,2,3) (0-based), casting it as a double Element
doubleVar = 3.14; //Set the doubleVar to a new value
assert(cellMatrix({1,2,3}).asElement<double>()() == 3.14); //Also the original cell array is modified, but not in the file.
assert(cellArray({1,2,3}).asElement<double>()() == 3.14); //Also the original cell array is modified, but not in the file.

```
Expand Down

0 comments on commit 3c4ba55

Please sign in to comment.