help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Error invalid concatenation of cell array with matrix


From: syed khalid
Subject: Re: Error invalid concatenation of cell array with matrix
Date: Sun, 5 Jan 2014 03:02:40 -1000

Hello Wang
  I made the modification but seem to get the following error. I am also showing the program
octave:1> LIDC_process_annotations.m
error: sq_string cannot be indexed with {
error: evaluating argument list element number 3
error: called from:
error:   /home/syedk/OCT/LIDC/find_files.m at line 46, column 18
error:   /home/syedk/OCT/LIDC/LIDC_process_annotations.m at line 113, column 11
octave:1> quit



if ~exist('ignore_dirs', 'var')
    ignore_dirs = {};
end
ignore_dirs_full = {'.','..',ignore_dirs{:}};
  dirData  = dir('/home/syedk/PAC/DATA/XML/tcia-lidc-xml/');      %# Get the data for the current directory
  dirIndex = [dirData.isdir];   %# Find the index for directories
  fileList = {dirData(~dirIndex).name}';  %# Get a list of the files

  mat_ind = cellfun(@(x) strcmp(x(end-3:end), extension), fileList, 'UniformOutput', true); % FIND XML FILES
  fileList = fileList(mat_ind); % keep only XML files

  if ~isempty(fileList)

      fileList = cellfun(@(x) fullfile(dirName,x), fileList, 'UniformOutput', false);  %# Prepend path to files

  end

  subDirs = {dirData(dirIndex).name};  %# Get a list of the subdirectories
  validIndex = ~ismember(subDirs, ignore_dirs_full);  %# Find index of subdirectories
                                               %#   that are not '.' or '..'




On Sun, Jan 5, 2014 at 1:29 AM, Wang S <address@hidden> wrote:
Hi Syed,

I'm sorry that maybe I hadn't express it clearly in the previous email.

I've just see your attachment "find_files.m". The line 46 in your file is
ignore_dirs_full = "{'.','..'},ignore_dirs(:));"

It seems that it was wrong and it maybe should be
ignore_dirs_full = {'.','..',ignore_dirs{:}};

And I think you could CC the emails to the "address@hidden" too,
so that maybe more supporters and helpers will help you in time.

Regards,
Wang S

------------------ Original ------------------
From:  "syed khalid"<address@hidden>;
Date:  Sat, Jan 4, 2014 03:51 PM
To:  "Wang S"<address@hidden>;

Subject:  Re: Error invalid concatenation of cell array with matrix


Hi Wang

   I apologize for my last email without proper context. I am new to Octave and new to the forum and but an urgent project to complete. I had begun process by trying to modify a tool to possibly use neural networks (using Octave) for predicting  radiology images. The description of the tool is in an attached README file but I fully realize this is out of the scope of a typical Octave support.


So am a bit of a loss here.


there are a few options


1. Perhaps you may give some pointers as to how I should proceed after made the changes. I am running Octave 3.24 - maybe I should upgrade to 3.6.x. However, since added some packages such as actuarial, etc some were dependant on 3.2.4 upgrading to 3.6.x may break some thing. But maybe a change to the find_file and/or annotation_process program may fix the errors.


2. Another possibility is assist as a consultant in which case I can provide more details. We can setup a payment system, if this is of interest to you.


In either case, I really appreciate your help so far.


Regards


Syed



On Fri, Jan 3, 2014 at 6:16 PM, Wang S <address@hidden> wrote:
Which version of Octave was running?
In Octave 3.6.x versions, "cat(2,{'.','..'},ignore_dirs);" works without error.

A workaround may be "{'.', '..', ignore_dirs{:}};".

Regards,
Wang S

------------------ Original ------------------
From:  "syed khalid"<address@hidden>;
Date:  Fri, Jan 3, 2014 01:27 AM
To:  "help"<address@hidden>;

Subject:  Error invalid concatenation of cell array with matrix


I am getting the above error where executing the line with ---->>

Is there a workaround or fix....

if ~exist('ignore_dirs', 'var')
    ignore_dirs = {};
end
--->>> ignore_dirs_full = cat(2,{'.','..'},ignore_dirs);
  dirData  = dir('/home/syedk/OCT/LIDC');      %# Get the data for the current directory
  dirIndex = [dirData.isdir];   %# Find the index for directories
  fileList = {dirData(~dirIndex).name}';  %# Get a list of the files


--
Syed Khalid



1-408-655-1096




--
Syed Khalid

CEO

Pacific Cloud

1-408-655-1096



--
Syed Khalid
 
CEO
 
Pacific Cloud
 
1-408-655-1096

reply via email to

[Prev in Thread] Current Thread [Next in Thread]