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

  • Home
  • SEARCH
  • 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 6362753
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T23:56:59+00:00 2026-05-24T23:56:59+00:00

quick beginner MATLAB question. How do I create a 1 by N matrix with

  • 0

quick beginner MATLAB question.
How do I create a 1 by N matrix with elements going from 1 to N?

Ex. [1 2 3 4 ..... N]

thanks!

  • 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-24T23:57:00+00:00Added an answer on May 24, 2026 at 11:57 pm

    Just do

    [1:N];
    

    The brackets are optional.

    There is also another option if you want to change the increment to something other than 1. The general pattern is

    [ start : step : stop ];
    

    So if you want only even numbers from 2 to 100, you can do

    [2:2:100];
    

    Or if you want to get numbers from 1 to 0 decrementing by .1 you can do

    [1:-0.1:0];
    

    I highly recommend you take a quick squiz through the Matlab Getting Started Guide. It covers the basics such as this.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

A quick question from a beginner. I'm doing an App for the iPhone and
A quick beginner's question in PHP. What does & in &$data do and what
Quick question here, I'm using Visual Studio to create an Outlook add-in. I've created
I'm a beginner to PHP and I have a quick question. Is it possible
I'm a beginner of Grail. I learned from the quick-start tutorial that the grails
Quick question. What do you think, I have a few sites that use a
Quick question: Would it be a good or a bad idea to implement my
Quick question: what is the compiler flag to allow g++ to spawn multiple instances
Quick design question. ClassA has a method called DoSomething(args) In DoSomething(), before it can
Quick question. There is a legacy website (that is not under my control and

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.