Answered
MATLAB is missing one essential rounding function!
ceilfix = @(x)ceil(abs(x)).*sign(x); or some such nonsense name. ceilfix(-2:0.2:2)

14 years ago | 2

| accepted

Answered
date formats
Assuming that all the dates are in BST and that you are not trying to adjust for different time zones ... x = 'Sat Oct 01 2...

14 years ago | 1

| accepted

Answered
What does this error message mean - No class precondition specified for input 'x' of function 'square'.
What do you get with which square -all square is a function in the signal processing toolbox. Do you have any other fu...

14 years ago | 0

Answered
Exponential/Power curve fitting from data
I think if you log transform everything you can eliminate the fminsearch and treat the problem as optimizing a linear equation. ...

14 years ago | 0

Answered
Accessing values of a field of a dataset
You can use dynamic field names: myDS=dataset([1;2],[3;4],'VarNames',{'F1','F2'}); strFieldName = 'F1'; myDS.(strFiel...

14 years ago | 1

| accepted

Answered
How could I neaten this code up.
x = [1 2]; eusol2 = 0; while sum(x) < euin if mod(sum(x), 2) == 0; eusol2 = eusol2 + sum(x); end x...

14 years ago | 0

Answered
String in matrix for loop
It really depends on what data type you are willing to allow. You say no structure and no array. MATLAB only deals with arrays; ...

14 years ago | 0

Answered
set variable to data that is loaded
x = load('matfile.mat'); temp = fieldnames(x); x = x.(temp{1});

14 years ago | 1

| accepted

Answered
accessing functions in Statistics toolbox
I would try ver and license and license('test', 'statistics_toolbox') to see if the statistics toolbox i...

14 years ago | 0

| accepted

Answered
How can I list all properties of a dynamicprops object ?
Can you use: properties doc properties Starting from the MATLAB example: <http://www.mathworks.com/help/releases/R201...

14 years ago | 0

Answered
Labelling x and y axis in MATLAB
Your best bet might be to use something like: <http://www.mathworks.com/matlabcentral/fileexchange/25298>

14 years ago | 0

Answered
How to properly use the ifft function ?
Working from Wayne's answer: x = randn(1000,1); xdft = fft(x, pow2(nextpow2(length(x)))); y = ifft(xdft); isreal(y...

14 years ago | 0

Answered
Create and indexing a matrix simultaneously
You cannot do it. See: <http://www.mathworks.com/matlabcentral/answers/1325-what-is-missing-from-matlab#answer_1931>

14 years ago | 0

Answered
Good programming practice...
Surprised Doug didn't chime in with his blog post: <http://blogs.mathworks.com/videos/2010/03/08/top-10-matlab-code-practices-th...

14 years ago | 1

Answered
Need help creating a loop
I wouldn't use a loop to do this (and I love loops). # How could you make z equal the sequence 1, 3, 5, 7, ..., N? # How cou...

14 years ago | 2

| accepted

Answered
help with label
What type of single quotes are you using? It could be the code formating in my browser, but your quotes look funky.

14 years ago | 0

Answered
dimension mismatch??! i cant see how this can be a dimension mismatch?
The problem is that Dates2(i,1) is a scalar, but datestr(Dates(i,1),'dd-mm-yyyy ') returns a string with length...

14 years ago | 0

| accepted

Answered
help with label
I am guessing you have a variable somewhere called xlabel. What do you get with which xlabel -all it should be something...

14 years ago | 0

| accepted

Answered
running time
Since mat(i, 2) will always equal mat(j, 2) when i is equal to j and you will always set mat(i, 2) to zero unless it is already ...

14 years ago | 1

Answered
Memory Tweaking
In general you cannot tweak the memory allocated to MATLAB. Do you need all of s1_total in memory? Can you only work on a single...

14 years ago | 0

Answered
Separate words in a sentence.
As a first stab you could look at the running RMS power averaged over a short (20 ms) time window. Periods of low power are more...

14 years ago | 0

Answered
PaperSize In Normalized PaperUnits
set(gcf, 'PaperUnits', 'Normalized') set(gcf, 'PaperSize', [0.5, 1]) get(gcf, 'PaperSize') The setting of the paper s...

14 years ago | 0

| accepted

Answered
Reading specific cell from several csvs
doc dlmread I cannot tell what row and column the number you need is. But assuming C13 means column 1 and row 13. file...

14 years ago | 0

| accepted

Answered
in algorithm a~b , in MATLAB...??????
Assuming ~ mean not (or not equal) in your algorithm you could use ~= or ~isequal(). I prefer the isequal approach since it hand...

14 years ago | 0

| accepted

Answered
findobj to refresh lines in a graph
Yes, it is easier if you create a handle ... if isfield(handles, 'line1') && ishandle(handles.line1) delete(handles.line...

14 years ago | 1

| accepted

Answered
Creating 3D audio files
I have never used (or even heard of) roomism before. It looks nice. It seems like the roomism file is an impulse response. You s...

14 years ago | 0

| accepted

Answered
downsampling a music in matlab
doc downsample Assuming your music is starting with a sample rate of 44.1 kHz and you are happy with a sampling rate of ~40...

14 years ago | 0

| accepted

Answered
There is any function substituting for this 'for loops'?
I think with some reorganization you could transform the code so that it could be run in a parfor loop or on a cluster with the ...

14 years ago | 0

Answered
Profiler biases execution time of optimized code
In order to profile your code MATLAB needs to do a little extra work. In general, I think this extra work is minimal. In your ca...

14 years ago | 0

Answered
Pan a Plotted Curve with a Stationary Plot Behind
I cannot get it to easily work with plotyy, but I think with some work you could. That said, I am not sure there is a real advan...

14 years ago | 1

| accepted

Load more