help-octave
[Top][All Lists]
Advanced

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

Re: strcat not converting cell into string...in Octave 4.2.2


From: Ben Abbott
Subject: Re: strcat not converting cell into string...in Octave 4.2.2
Date: Sun, 29 Apr 2018 11:16:43 -0700

On Apr 29, 2018, at 10:21 AM, RT <address@hidden> wrote:

Greetings
After a M file was completed I would have Octave 4.0 execute a simple audio command "espeak" to tell me when a crossfade was completed.

The line below worked in octave 4.0 on ubuntu 16.04 64bit
system (strcat({'espeak '},'"' ,'Done with cross fade','"'))

but when I upgraded to ubuntu 18.04 which has Octave 4.2.2
I get an error
error: wrong type argument 'cell'
error: system: first argument must be a string

I thought strcat was suppose to convert everything into a string?  any work arounds?

Thanks

I expect a change was made for compatibility with Matlab.

-----------------
strcat({'espeak '},'"' ,'Done with cross fade','”')

ans = 

    'espeak "Done with cross fade"'

whos ans
  Name      Size            Bytes  Class    Attributes

  ans       1x1               170  cell
-----------------

A simple fix is to covert to a cs-list (this works for Octave, but not Matlab).

system (strcat({'espeak '},'"' ,'Done with cross fade','”’){:})

Ben

reply via email to

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