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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:16:26+00:00 2026-05-25T19:16:26+00:00

I am having trouble finding a matlab function to slice an element out of

  • 0

I am having trouble finding a matlab function to slice an element out of an array.

For example:

A = [1, 2, 3, 4]

I want to take out on element of this array, say the element 3:

B = [1, 2, 4]

Is there a matlab function for this or would I have to code the algorithm to construct a new array with all the elements of A except 3?

  • 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-25T19:16:26+00:00Added an answer on May 25, 2026 at 7:16 pm

    Do this:

    index_of_element_to_remove = 3;
    A(index_of_element_to_remove) = [];
    

    now A will be [1 2 4]

    If you want to remove more elements at the same time you can do:

    index_of_element_to_remove = [1 3];
    A(index_of_element_to_remove) = [];
    

    now A will be [2 4]

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

Sidebar

Related Questions

I'm having trouble finding the right solution for this fully fluid layout. I want
I'm having trouble finding an open-source IDE with support for Git. Are there any
I'm looking to try out JRuby and JRuby on Rails. I'm having trouble finding
I am having trouble finding out how to figure out if an HTML dropdown
I'm having trouble finding a clear answer to this question so I thought I'd
I'm having trouble finding a nice elegant ruby way to do this. I have
I'm having trouble finding out which tag is currently checked out. When I do:
I'm using a raw query and i'm having trouble finding out how to get
I am having trouble finding a clear, sensible example of usage of context with
I am having trouble finding resources on this, it may be a keyword thing.

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.