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 8157767
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T17:23:48+00:00 2026-06-06T17:23:48+00:00

When I make a 1×10 matrix in MATLAB, such as a=[1:10] , it returns:

  • 0

When I make a 1×10 matrix in MATLAB, such as a=[1:10], it returns:

a =
     1     2     3     4     5     6     7     8     9    10

i. e., it ignores zero-digit from numbers 1 to 9. I’d like to have a matrix like that:

a =
     01     02     03     04     05     06     07     08     09    10.
  • 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-06-06T17:23:50+00:00Added an answer on June 6, 2026 at 5:23 pm

    If you want to display numbers in a specific format, you can overload the disp function for the specific type of number. In that function, you’ll need to create a string with leading zeros.

    If you want to create strings that contain numbers with leading zeros, you can use sprintf. For example, if you want to have

    year = 2012;
    month = 6;
    day = 1;
    

    you can create a file name with leading zeros like this:

    fileName = sprintf('%i%02i%02i.dat',year,month,day)
    fileName =
        20120601.dat
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an POST AJAX command that returns the following: `email{admin@stackoverflow.com} cid{215}` What I
I make an app that have to printing image. I need to print image
I have a simple if statement in my view that returns x = 0
I'm tying to make a radgrid that sorts items like a bank statement. By
i make one class file for jar. and this class have use wurfl. and
SOLUTION Make sure in the plist that the storyboard name is listed as the
For example, http://api.hostip.info/get_html.php?ip=12.215.42.19 When visiting that URL, it will return: Country: UNITED STATES (US)
I'm trying to make a route parameter match an alphanumeric value that's 3 to
I make code to display multiple pages (max. 5 lines/page) with persons from one
How do I make the following plot in R? I have a file of

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.