72511

How to run this MATLAB's command in R language?

<h3>Question</h3>
file=[dir,'/',filename]; fop=fopen(file,'rb'); [values, count]=fread(fop,[4969, 2137],'float'); values=values'; fclose(fop);

I am running this command to read a binary file in MATLAB which contained 2137 rows and 4969 columns. But unable to read same file in R language. I tried this command to run same process:

jo<-file(choose.files(),"rb") jo2<-readBin(jo,double(),n=c(4969,2137),size=4,endian = "little")

But It only read the first row. Can anyone give me any suggestions to perform matlab's equivalent command in R to read file same as matlab.

来源:https://stackoverflow.com/questions/62115097/how-to-run-this-matlabs-command-in-r-language

Recommend

  • Using `rand()` with `having`
  • How to visualize k-means centroids for each iteration?
  • Publish Android App in Visual Studio
  • Flask Blueprints: How to use them?
  • Track WPF message box text and confirmation box 'Yes' button in Coded UI testing
  • Manipulating a group view in a ExpandableListView from the child view
  • How to configure an eclipselink JTA sequence connection pool
  • Monkey patching ActiveResource::Errors
  • Quartz clustering load balancing algorithm internal implementation in Jdbcjobstore
  • Converting array with Different data type
  • NOTE or WARNING from package check when README.md includes images
  • How to set a dynamic form fields to dirty or touched with angular?
  • Encode string to Base64 in Inno Setup (Unicode Version of Inno Setup)
  • PHP users local time
  • in Gwt, there are 2 different packages (or 2 options) for doing drag n Drop? Which one is better?
  • Create One-To-One relationship between table and view in EF4?
  • Parallelization via JDBC - Pyspark - How does parallelization work using JDBC?
  • What is the diff. between default.properties and project.properties?
  • Paging Through XML Data Using jQuery and HTML
  • Spongycastle is missing many algorithms when loaded on android
  • Can Node.JS on OpenShift be upgraded?
  • async GET request with body from browser
  • Combine two jagged lists into one
  • didSelectItemAtIndexPath of UICollectionView inside of a UIScrollView is not getting called
  • I need a PHP mySQL Login script that directs user to specific URL based on username and password
  • Firestore: Version history of documents
  • Sample deviceQuery cuda program
  • Java Collections.shuffle() weird behaviour [closed]
  • Request Access Token in Postman for Azure Function App protected by Azure AD B2C
  • Thumbnails for mxml components in Flex
  • Ember.js + JQuery-UI Tooltip - Tooltip does not reflect the model / controller changes
  • time column in sqlite using gorm
  • When to use the tag in the head and body section of a html page? [duplicate]
  • Create an average of multiple excel chart without the data source
  • gnuplot - How to make zmin equal to zmax keeeping autoscale on z axis
  • How to include associated objects using gon in Rails/jQuery
  • How can I ssh into a server that requires 2 password authentication using python's paramiko mod
  • Background transfer download task failed when app was closed
  • XEP-0166: Jingle protocol implementation for voice/video chat in iOS
  • Accessing Arguments, Workflow Variables from custom activities