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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T20:54:31+00:00 2026-06-05T20:54:31+00:00

How can you send an argument to the help function? I wish to have

  • 0

How can you send an argument to the help function?

I wish to have something like this:

function intro(funcname)
  disp('This is an introduction to the function you chose. See the help below:')
  help funcname
end

where I can show the help text for a function, which name comes as an argument in the function. The above does not work though, when MatLab just searches for funcname as a function name and not the variable value.

  • 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-05T20:54:34+00:00Added an answer on June 5, 2026 at 8:54 pm

    In short: Yes, you can do it, by using the function form of help:

      x = 'mean';
      help(x);
    

    In your example:

    function intro(funcname)
      disp('This is an introduction to the function you chose. See the help below:')
      help(funcname);
    end
    

    Explanation:
    The form that you are using

    help xxx
    

    is merely a shortcut to:

     help('xxx');
    

    If you have multiple arguments separated by space (Thanks to @Amro on this one), it is the same like sending multiple arguments:
    For example:

    mcc -m fileNames
    

    is equal to

    mcc('-m','fileNames');
    

    As a side note that represents my opinion, I would like to add that in general, the second form is preferred, except when you write a quick-and-dirty code.

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

Sidebar

Related Questions

Is there any way I can send an email, like any frameworks or something.
I have a string that looks like this: [1011000, 1000010, 1001101, 1000011]. My argument
How this UIButton rewind can send notification to UIButton play to perform playpauseaction method
I have several sites where users can send me email through an html form
This is driving me nuts so I hope someone can help an Objective-C noob
Can a pthread only take one argument? So If I wanted to send in
I really need help with this one. I have written an adding that adds
How can I send custom events from one object to another? I have 2
There are some sites that send parameters via URL like this: www.site.com/user/12345678 (just like
I can send requests to friends using Multi Friend Request Selector inside my Page

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.