Archisman Panigrahi
Archisman Panigrahi

Reputation: 633

Use a string to call commands in Octave

Suppose I define

Octave:1>s = "hello";
Octave:2>mkdir s
Octave:3>cd s

This creates a directory named s (instead of hello), and changes to that directory. How to use hello instead?

Upvotes: 0

Views: 117

Answers (1)

Tasos Papastylianou
Tasos Papastylianou

Reputation: 22215

mkdir(s)
cd(s)

Take a look at functional vs command syntax: https://octave.org/doc/v5.2.0/Commands.html

Upvotes: 3

Related Questions