Answered
How to move files based one whether their name is contained in a spreadsheet?
>> cssm moves the files <</matlabcentral/answers/uploaded_files/119096/snip_20180526101155.png>> &nbsp; where ...

8 years ago | 1

| accepted

Answered
Arrow between two subplots
See <https://se.mathworks.com/help/matlab/ref/matlab.graphics.chart.primitive.line-properties.html Line Properties>. Set the val...

8 years ago | 0

Answered
Attempt to execute SCRIPT builtin as a function:
*PLS_Toolbox_852* is the name of a toolbox by <http://www.eigenvector.com/software/pls_toolbox.htm Eigenvector Research, Inc>. K...

8 years ago | 0

Answered
Can someone tell me why I keep getting parse and syntax errors here?
To make your code more readable, I formatted it and in that process added a closing *|end|*. Now, your code works just fine ...

8 years ago | 0

Answered
What does this Error code mean ?
Deep in the code of Matlab itself Handle input argument contains non handle values a nonhandle value was passed where ...

8 years ago | 0

Answered
Help using Regexp:
One way >> str='Some.Text {a1=v1 a2=v2}'; >> cac = regexp( str, '(?<={)[^}]+(?=})', 'once', 'match' ) cac = a1=v1 ...

8 years ago | 0

| accepted

Answered
Creating a vector with nested for loops and a while loop
One way >> cssm ans = 2 4 8 16 32 64 128 256 >> where function vector = cssm ...

8 years ago | 1

| accepted

Answered
MATLAB writing text file “invalid permission” in UBUNTU
Doc says: <https://se.mathworks.com/help/matlab/ref/fopen.html?searchHighlight=fopen&s_tid=doc_srchtitle fileID = fopen(filename...

8 years ago | 0

| accepted

Answered
Transferring 4 already plotted figures into one with subplots
AFAIK: Matlab doesn't provide a specific tool to copy the content of separate figures to subplots of one figure. However, there ...

8 years ago | 0

| accepted

Answered
How can I remove a duplicate set values?
I guess * *|d|* &nbsp; is a row vector of whole numbers * *|d|* &nbsp; consists of multiple sets of *three* numbers * you s...

8 years ago | 1

Answered
Using dlmwrite to save data?
_"Too many output arguments."_ &nbsp; Remove the output, i.e. replace spillData = dlmwrite('spillData.txt',spillLength,'de...

8 years ago | 1

| accepted

Answered
Calculating the sum of the absolute differences of a matrix
Here is a script that builds on my answer to your last question %% x = [0 0 1 2 4 2 5 1 0 0 3 7 9 6 9 0 0 0 0 3 7 0 ...

8 years ago | 0

Answered
How do I sum the first 3 values after each zero
This %% x = [0 0 1 2 4 2 5 1 0 0 3 7 9 6 9 0 0 0 0 3 7 0 0 0 2]; dx = [ 0, diff( x ) ]; len = length( x ); ...

8 years ago | 1

| accepted

Answered
How can I get plain text diary files?
Until something better turns up try %% ffs = 'c:\tmp\dbch_diary.txt'; str = fileread( ffs ); %% out = regexpr...

8 years ago | 0

Answered
How can I make my code faster?
Firstly, run *|profile|* on your code to find the bottlenecks. See <https://se.mathworks.com/help/matlab/ref/profile.html profil...

8 years ago | 0

Answered
Removing Excess Data From a .csv File using Textscan
As Walter Roberson noted, the file *|Example.csv|*, which you attached, is an Excel-file. &nbsp; *|textscan|* cannot read Excel-...

8 years ago | 1

Answered
How can I reduce the computation time for this MATLAB code? It always shows busy without giving any output
I put your code in a function and profiled it. See <https://se.mathworks.com/help/matlab/ref/profile.html profile, Profile execu...

8 years ago | 1

Answered
extract routine data from extra large (~20GB) text file
*First shot.* I acknowledge that this might look cryptic, but it seems to work. >> filespec ='h:\m\cssm\HISTORY_Trial.txt';...

8 years ago | 1

Answered
Deleting cell arrays.
_"is there a way to completely delete cells from this array?"_ &nbsp; Hint: >> cac={ [2] [0] [1] [3] } cac = ...

8 years ago | 0

Answered
how to select range of dates
Hint: accumarray( t.Year-2007+1, stock, [], @mean ) where *|t|* is a <https://se.mathworks.com/help/matlab/ref/datetime....

8 years ago | 1

| accepted

Answered
Running pre-loaded answers for input queries on the command line in Matlab
*Background:* It's possible to overload the Matlab function, *|input|*, with your own function, *|input|*, which you put in a fo...

8 years ago | 1

| accepted

Answered
Counting number of certain letters
_"What am I doing wrong below?"_ # _"to go through each element of the string"_ &nbsp; your for-loop is fine # _"test if it'...

8 years ago | 1

Answered
Increase the number of fields within a 'for' loop?
Run %% species = 'A'; reservoir = 'B'; unit = 'C'; LITgeo.(species).(reservoir).(unit) = 1; %% LITgeo.(...

8 years ago | 0

Answered
Reading text in a cell array
if strcmp( imagetype1, 'flowers' ) % recommended

8 years ago | 0

Answered
Reading text file with number and strings
To skip the second column replace in_data = textscan(fid2,'%f%s'); by in_data = textscan(fid2,'%f%*s'); and see ...

8 years ago | 0

| accepted

Answered
How do can I change an input variable for get a different answer each time a loop runs?
Study this >> M = cssm M = 0 0.0212 0.0212 0 7.1045 7.1045 0 0 ...

8 years ago | 0

Answered
Cell contents reference from a non-cell array object?
* See <https://se.mathworks.com/help/matlab/matlab_prog/debugging-process-and-features.html Debug a MATLAB Program> *|yourInf...

8 years ago | 0

Answered
What is wrong with my code?
* See <https://se.mathworks.com/help/matlab/matlab_prog/debugging-process-and-features.html Debug a MATLAB Program> I get an ...

8 years ago | 0

| accepted

Answered
Why are people deleting answers?
I delete answers occasionally and that's because * I misunderstood the question * my answer is wrong * there are other bett...

8 years ago | 4

Answered
How can I vectorize this function with nested FOR loop?
Yes, try this >> max( cssm, [], 1 ) ans = 0 0 0 0 0 0 0 0 0 0 0 >> ...

8 years ago | 1

Load more