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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T09:42:00+00:00 2026-05-31T09:42:00+00:00

I have recently been working with Matlab. My question stems from my usage over

  • 0

I have recently been working with Matlab. My question stems from my usage over a few months and is something that I can’t seem to solve. I have an external SVM toolbox (OSU-SVM) that I would like to interface to with my project. I am able to get the entire system to work when I add the path of the toolbox manually (Right click -> Add to Path -> Selected Folders and Subfolders). What I would like to do is add the folder in a script. I’ve tried the “addpath” command but for some reason I can’t get it to find the library relative to the m-file (script) that I run the command from. The following is an example of the code:

% Add OSU SVM system
addpath(genpath('./osu-svm/'));

The reason the I’d like to add the path using a relative folder to the M-file is that the code needs to run in a different environment that will not have the toolbox install. The code is also going to be executed in a different OS to the one I am developing on. That is, I am running a Windows Matlab to develop the code and need to run the finished system on a Linux machine. The process of running my files needs to be as painless as possible and shouldn’t require much input from the user. That is why I’m specifically trying to avoid manual addition of the path.

On a side note a similar problem occurs when I wish to use “uigetfile” using a relative path. I believe there is something I am missing that will help me solve both of these simultaneously. Any help would be greatly appreciated.

  • 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-31T09:42:01+00:00Added an answer on May 31, 2026 at 9:42 am

    Instead of ‘./osu-svm/’ alone use

    fullfile('.','osu-svm')
    

    The reason it does not work for you on windows is that you are using forward slash file separators. Full file will make a file string containing the correct file separator for each OS.

    The genpath example in the matlab documentation also uses fullfile
    http://www.mathworks.co.uk/help/techdoc/ref/genpath.html

    Furthermore, the ‘.’ is kinda unnecessary as it just means “relative to the current directory” and can be left out of the command. Perhaps you meant one directory up?

    '..'
    

    ???

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

Sidebar

Related Questions

I have recently been working on a C# application that calls a webservice over
I have recently been working with someone on a project that is very ajax
I have been working with databases recently and before that I was developing standalone
I have recently been working with a COM+ component that processes an input XML
I've been working on some solutions for some questions that have been recently posted
I have recently been tasked to working on code that uses Java CUP. Does
So recently I have been working on phonebook project that uses Binary Search Tree.
On a rails project that I know to have been working as recently as
recently I've been working on a project that gets a response from a a
I have recently been working with Python using Komodo Edit and other simpler editors

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.