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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T12:34:43+00:00 2026-05-20T12:34:43+00:00

In Matlab, the tilda symbol can be used to ignore a certain parameter from

  • 0

In Matlab, the tilda symbol can be used to ignore a certain parameter from a function that returns multiple parameters. However, when I try the same code in Octave, I get a syntax error.

I have two questions:

  1. Why does Octave not support this? (i.e. bug, future enhancement, design decision, etc.)

  2. What’s the alternative syntax in Octave, if any (without just putting a “dummy variable” into the spot then clearing that variable)? Additionally, is this alternative syntax Matlab compatible?


% this is valid Matlab code, but will result in a syntax error in Octave
[colA, colB, ~, colC] = textread('data.txt', '%d %d %s %d', 1);

Fyi, I’m using Octave 3.2.4 compiled for windows with some Octave Forge packages.

  • 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-20T12:34:44+00:00Added an answer on May 20, 2026 at 12:34 pm

    This syntax was just introduced in one of the latest versions. So there is no expectation that Octave would match that feature.

    Your alternatives are effectively to introduce dummy variables in some form. Here are the common choices used before ~ became an option.

    [colA, colB, colC, colC] = textread('data.txt', '%d %d %s %d', 1);
    [colA, colB, ans, colC] = textread('data.txt', '%d %d %s %d', 1);
    

    I like the latter, as ans is what matlab uses anyway as a bit bucket.

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

Sidebar

Related Questions

Apparently Matlab load loads the data from a .mat file into the variable that
Matlab's cross-correlation function xcorr(x,y,maxlags) has an option maxlag , which returns the cross-correlation sequence
Matlab has a nice property that scalar functions (such as sin) can work on
In matlab there is a function called KnnImpute that permit to replace missing values
In MATLAB there's a nice function called fileparts that takes a full file path
In matlab we can use filtfilt function to filter out data which implements forward
I'm trying to execute a script in MATLAB that uses a tilde. However, earlier
In Matlab documentation for function fminsearch(fun,x0) , x0 can be a scalar, vector, or
Does MATLAB have a function/operator that indicates the type of a variable (similar to
MATLAB is a pass by value language. I have a recursive function that processes

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.