Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 7 years ago.
Improve this question
I am now want to compress a file name File1.txt which is in the current folder. When I try to use the function tar like:
tar('File1.tgz','File1.txt');
Some error happen.
Undefined variable "File1" or function "File1.tgz".
Error in tar (line 1)
tar(File1.tgz,'File1.txt');
Is it any incorrect part of this?
You forgot to put ''.
Try:
tar('File1.tgz','File1.txt');
In my MatlabR2013a it works without problems.
Matlab example:
%Tar all files in the current directory to the file backup.tgz
tar('backup.tgz','.');
Related
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 4 years ago.
Improve this question
I use a bash script (konsole-name.sh) to change a terminal name, like this:
#!/usr/bin/bash
echo -en "\e]30;$1\a"
and I wanted to use the same method from a perl script that I use to check the GPU temperature, so that it updates periodically the window title.
Yet I didnt find a way.
I tried both this:
$comm='echo -en "\e]30;T=$t\a"';
`$comm`;
and this, using my bash script:
$comm="konsole-name.sh T=$t";
`$comm`;
there is some way to do it?
The console escape sequences work by printing text to the terminal. In your case, the backticks gobble up the output of the script.
Most likely you just want print "\e]30;$1\a"; from within Perl:
my $title = "Fancy terminal title";
print "\e]30;${title}\a";
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 6 years ago.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Improve this question
I want to read all wave files in a folder in Matlab. I use this code to open theses files:
Files=dir('path folder.wav');
for k=1:length(Files)
FileNames=Files(k).name;
[s,fs]=wavread(FileNames);
end
but this code doesn't work, wave files do not open. Why? Can you help me?
The dir() command returns only file names - not the full path.
So, possible you just need to restore full path:
dirMask = 'path folder.wav';
wavRoot = fileparts(dirMask);
Files=dir(dirMask);
for k=1:length(Files)
FileNames = fullfile(wavRoot, Files(k).name);
[s,fs] = wavread(FileNames);
end
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 6 years ago.
Improve this question
In Windows 7, I need to use Maple to export the Tex code into a text file.
In Command-line Maple, I type latex(LambertW(x), "C:/Users/Bravo/Desktop/out.txt"); to do this, but the result is:
{\rm W} \left(x\right)
That is not right, why does it happen ? Is there any method to solve this problem ?
Yeah, that is a bug in Maple. You can try latex(subs(LambertW=lambertW,erf=Erf,arctanh=Artanh,LambertW(x)));
Reference: http://www.mapleprimes.com/questions/201975-Maple-Error-Using-Latex-Command-How-To-Resolve#comment207767
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 7 years ago.
Improve this question
load('matrix.mat');
userInput = input('input a value from 1-5')
DayReport = sum(matrix(:,end 2);==userInput)
I am trying to retrieve the number of rows in column 2 of the loaded matrix that corresponds with the userInput. However, when I try to run the code, it says that there is an error in the third line (simply, "Unexpected MATLAB expression"). Any ideas as to why this is?
EDIT: I found a solution, turns out i don't need the "end" or the semicolon within the sum function.
load('matrix.mat');
userInput = input('input a value from 1-5')
DayReport = sum(matrix(:,2)==userInput)
Remove the semi-colon and the end statement in the last line of code. My guess is that you want to access the second column of matrix, and with that it's just matrix(:,2).
Also, I suspect that you copied and pasted the code from somewhere. That's generally bad programming practice because where you copied the code from may work in that situation, but if you try and bring it into your current context, it may be slightly different than what you're actually doing and can result in errors.
See this good discussion on Programmers Stack Exchange on why you should avoid this all together: https://softwareengineering.stackexchange.com/questions/87696/is-copy-paste-programming-bad
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
is there any pgp key dumping program like http://www.pgpdump.net/ that also shows the MPI values as well as the other information? the linked website's program will print out ... for the long MPI, which is perfectly logical, but I want to see the values since my program is for some reason getting all but one part right (reading an elgamal public key), and its messing with everything that comes afterwards. i want to see where im off by a few bits
gpg --list-packets --debug-all should show MPI values.
pgpdump.net links to the source code of pgpdump. Perhaps you could find the part where ... is written and change it in a local copy of the program.