Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6835345
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:13:17+00:00 2026-05-26T23:13:17+00:00

I have a problem when using cell arrays in an m-file. I create a

  • 0

I have a problem when using cell arrays in an m-file. I create a number of cell arrays using the function given in here. What I store on each of these arrays is numerical values being read from a text file (I convert them to string before I put them into the arrays). The problem is that the some numbers doesn’t seem to be strored in the arrays correctly:

The text file contains that:

1976787196
8
1976945848
8
1977105448
8

And the contents of a cell array in which the above is store are the following:

  Columns 1 through 3

                1976787196           681405151445000                1976945848

  Columns 4 through 6

           685476780441608                1977105448           685476780441608

As you can see, instead of stroring 8, I get a very big integer.

Actually, I want all the contents of the cell arrays that I create to contain only 32-bit integers. Can I specify that requirement somehow? Thanks in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T23:13:17+00:00Added an answer on May 26, 2026 at 11:13 pm

    It depends how you read the data from text file. Try using TEXTSCAN function. Format string ‘%u32’ specifies that you want to read unsigned 32-bit integer data.

    filename = 'test.txt';
    fid = fopen(filename,'r');
    x = textscan(fid,'%u32','delimiter','\t','CollectOutput',1);
    x = x{1};
    fclose(fid);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a problem using JSON and arrays. Here is my code: while($row =
I have a problem setting the CSS class for each cell in a given
I have a problem using the Java search function in Eclipse on a particular
I have the following problem using template instantiation [*]. file foo.h class Foo {
I have a Moose class that i would like to store using Apache::Session::File. However,
I have problem while using jquery maskedinput with asp.net textbox. I have a check
I have a problem using Linq to NHibernate to load an object and eagerly
I have a problem using the SSIS. I try to import data from database
i have a problem using the Catch Clipboard Events code found on this link
Greetings, I have a problem using jqgrid and jquery tab (I am coding in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.