Answered
Strange behavior of anonymous functions
# If you have the Control or Signal Toolbox, *|ss|* as the name for variables used to cause trouble. See <http://se.mathworks.co...

11 years ago | 0

Answered
How do I unsubscribe MathWorks promo e-mail list?
I don't get it. Isn't this good enough? At the bottom of the page I find <</matlabcentral/answers/uploaded_files/27036/Captu...

11 years ago | 0

| accepted

Answered
compare length of arrays in a cell
A hint based on some guessing %% cac = {'abc','def', 'ghi'}; tmp = cellfun( @length, cac, 'uni', false ); ...

11 years ago | 0

Answered
How to manipulate single lines in text files without writing the entire file?
If the file has a fixed (and simple) format and _"manipulating"_ doesn't change the size of the file, *|memmap|* might be the be...

11 years ago | 0

Answered
Highlight a number + Ctrl + Scroll in Matlab editor - bug or feature?
It's most likely a shortcut to this feature (R2013b). <</matlabcentral/answers/uploaded_files/26997/Capture.PNG>>

11 years ago | 0

| accepted

Answered
Error when interpolating data code attached
I get an error when I run your code >> ethi = interp1 (te, eth, (tg+5)); Error using griddedInterpolant The gri...

11 years ago | 0

| accepted

Answered
cells to double array
This is start ( *|a|* was missing so I guessed) %% C = []; for n = 1:21 C = [ C; reshape( sscanf( or...

11 years ago | 1

Answered
Slicing elements in a cell array
_"What's the easiest way"_ &nbsp This approach is one candidate >> datestr(datenum(temp,'yyyy-mm-ddTHH:MM:SS'), 'yyyy-mm-...

11 years ago | 0

| accepted

Answered
MATLAB using too much RAM
On R2013b (64bit Windows7 32GB) your script run without error. It increased memory usage, according to the task manager, from 5....

11 years ago | 0

| accepted

Answered
Convert .csv file(s) to netCDF file
AKAIK: There are good support to read csv-files and write netCDF-files, but no tool to convert csv-files to netCDF. (There are c...

11 years ago | 1

Answered
MATLAB 2014 - Change workspace sorting
I'm surprised not to find a *|'legacy'|* option in <http://se.mathworks.com/help/matlab/ref/sort.html sort, Sort array elements>...

11 years ago | 0

Answered
10 Largest numbers in a matrix
The largest value of *|magic(7)|* is *|49|* M = magic(7); [ val, ix ] = sort(M(:),'descend'); [rr,cc] = i...

11 years ago | 0

Answered
i am executing a piece of code given below in which i am getting the error"Unexpected MATLAB expression" help me to solve it
What is your intent? This doesn't honor Matlab syntax rules. Minimal changes are needed to create a cell array rc = { ...

11 years ago | 0

Answered
textscan unable to parse floats beyond 107M bytes
*|'BufSize'|* is that a documented Name-Value Pair Arguments of *|textscan|*? It is of *|textread|* and *|strread|*, but not of...

11 years ago | 0

Answered
Can I split an array by a specific word?
Try >> cac = strsplit('Can I split an array by a specific word?', 'array') cac = 'Can I split an ' ...

11 years ago | 0

Answered
How to loop through and create an nx2 vector?
Try output = nan( 10, 2 ); for ii = 1:10 output(ii,:) = myfunction(ii); end and read * <http://...

11 years ago | 0

| accepted

Answered
Changing colormap of individual subplot
That used to be one of Matlabs weak spots. R2014b changed that. There are several tools in the File Exchange, which mimics mu...

11 years ago | 1

| accepted

Answered
How do I display these matrices side by side incluing one with character strings.
_"I haven't been able to get it to work"_ &nbsp Show what you done and we have a chance to spot your mistake. for rr = 1 ...

11 years ago | 0

| accepted

Answered
problem in defining function in matlab
Add mu1 = cell( 200, 4 ); before the for-loops and read <http://se.mathworks.com/help/matlab/matlab_prog/preallocate-m...

11 years ago | 0

| accepted

Answered
How do I replace a word in a string with ****?
Try str = strrep( str, 'Long', '****' ); and read <http://se.mathworks.com/help/matlab/ref/strrep.html strrep, Find a...

11 years ago | 1

| accepted

Answered
need a code to restart matlab automatically run a function and then restart matlab doing the same
I use restart of Matlab as the last resort when the execution has screwed up badly. system( '"c:\m\startup\test4ida_hard_...

11 years ago | 1

| accepted

Answered
Usage of Exclamation point in MATLAB?
See the documentation <https://mathworks.com/help/matlab/matlab_external/run-external-commands-scripts-and-programs.html Run Ext...

11 years ago | 2

Answered
multiple file reading from subdirectores...
It looks like the filespec is erroneous (and illegal). The first part of the filespec, *|/home/shi...|*, is repeated. <...

11 years ago | 1

| accepted

Answered
where do I unzip files I download from File Exchange?
Proposal: # create a folder, e.g. FEX # unzip the download to the folder FEX # add FEX to the search path # read <http://s...

11 years ago | 1

Answered
How to use FIND function here?
_*"I need to get 1st and 3rd column as my output."*_ &nbsp Is this what you want? %% fid=fopen('test.txt'); da...

11 years ago | 1

| accepted

Answered
Class Overriding and Package Namespacing?
* _"Is there any way to achieve the shortened name?"_ &nbsp No. * _"And it still didn't work"_ &nbsp Neither when I try with R2...

11 years ago | 0

| accepted

Answered
finding the source of an error in a timer code
See * <http://se.mathworks.com/matlabcentral/answers/65694-debug-code-invoked-by-timer Debug code invoked by timer> * <http:...

11 years ago | 1

| accepted

Answered
Getting errors with code.
The first problem is that *|t|* is not defined before line 7, which is [xt,yt] = trajectory(v0,theta,t,g); Put your c...

11 years ago | 0

Answered
how i can overcome this problem about the command save ?
You try to save to *|C:\Program Files\MATLAB\R2012b\bin|*, which explains the error message. Proposal save( 'c:\folder...

11 years ago | 1

Answered
How do I access reference text file? Low Level I/O
See <http://matlab.wikia.com/wiki/FAQ#How_can_I_process_a_sequence_of_files.3F How can I process a sequence of files?> Note: ...

11 years ago | 0

| accepted

Load more