MATLAB Answers

Sunu
0

How to use regexp to split the filepath

Asked by Sunu
on 3 May 2013
file path= C:\Data\Project\PCOD\PCOD_Model.mdl
I want the model path only like C:\Data\Project\PCOD\.... how can I do it

  0 Comments

Sign in to comment.

Tags

1 Answer

Answer by Image Analyst
on 3 May 2013
 Accepted Answer

Use the fileparts() function, not regexp():
[folder, baseFileName, extension] = fileparts(yourFilePath);

  0 Comments

Sign in to comment.