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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T13:07:03+00:00 2026-06-14T13:07:03+00:00

I come with the background in languages like Java or Python where modular programming

  • 0

I come with the background in languages like Java or Python where modular programming is enabled by packaging system and import directive (aka namespace aliasing). Historically MATLAB’s approach to resolve problems like naming conflicts boils down to setting/playing with MATLABPATH, renaming/extending identifiers with prefixes, etc. So far I have been successfully playing with native MATLAB packaging by prepending plus sign “+” before the folder name (MATLAB notation for package also see here). Obviously they are very long to type 😉 Basically I am back to the similar problem as discussed here with no solution. So let me paraphrased for my particular angle:

Assume I have folder +mypackage defined containing file myfun.m with the function code of the same name.

How to achieve aliasing for MATLAB function inside the user (non-java) package as illustrated by the following python code:

from mypackage import myfun

?

[EDIT] Please note that AFAIK import keyword works only for java classes (with jvm attached to MATLAB process). No, import is working perfectly fine for both functions and aliases for objects and function of both Java and MATLAB origin.

Possibly related but not the same.

[EDIT2]

python’s

from mypackage import myfun as anotherfun

is equivalent to MATLAB’s

anotherfun = @mypackage.myfun
  • 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-14T13:07:05+00:00Added an answer on June 14, 2026 at 1:07 pm

    Doesn’t

    import mypackage.myfun
    

    work?

    link to documentation

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

Sidebar

Related Questions

First off, I come from a RDBMS/SQL/C++/Java/Python background and I'm a newbie to Gaelyk,
I come from Java Background and so used to Debugging using Eclipse but have
I come from a Java background and am getting more into .NET, what are
I come from a Java background and have been using C# for the last
I come from a background of C, Fortran, Python, R, Matlab, and some Lisp
My background is C and C++. I like Python a lot, but there's one
I come from Java background. I was wondering if there was a way to
I come from a Java background, where try/catch is common practice. After few months
I come from PHP background and am used to doing var_dump , echo and
What's the best way to print a BitmapImage? I come from a background in

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.