0

I'm trying to use the "import" function on octave, but it is not yet implemented; I am getting the "import function is not yet implemented in Octave" error. I've found this question and answer for this (import function in octave) but the answer says to make your import function. Having made the import function, I'm not sure how to implement it. How do I do this?

Chris
  • 153
  • 7
  • This seems like a question answered by a tutorial. This might help https://octave.org/doc/v4.2.2/Function-Files.html – Garrigan Stafford Aug 02 '18 at 18:46
  • What is your actual problem here? Are you trying to run matlab code in octave that uses the import statement? I find that importing things makes less sense when dealing with namespaces (what matlab confusingly calls packages), but if you really have to, there's nothing stopping you from assigning a namespace-qualified function to a function handle and using that in your code instead. So what are you actually trying to achieve that requires a specific 'import' function? – Tasos Papastylianou Aug 04 '18 at 19:35
  • @TasosPapastylianou Im trying to import a package I was using for matlab, but dont have access right now. The package is javaplex; ive been reading through the article, but havent had much time lately. It seems to be helpful so far though – Chris Aug 04 '18 at 19:51
  • right; this changes things considerably then. Having looked at the javaplex documentation, it seems to me what you are trying to import is not a matlab 'package', it's a _java_ package, required during javaplex's initialisation script. As such, you'll have to look at https://octave.org/doc/interpreter/Java-Interface.html instead; though at the moment Octave handles java quite differently from matlab, so prepare yourself that it might not be possible to run javaplex on octave at all. It may be worth writing to the javaplex authors and asking them about this directly. – Tasos Papastylianou Aug 05 '18 at 03:06
  • @TasosPapastylianou I see, thank you for your response! I had installed java but didnt realize they might be handled differently. – Chris Aug 05 '18 at 13:58

0 Answers0