Answered
existence of structure without the use of eval
have you tried <http://www.mathworks.co.uk/help/techdoc/ref/exist.html |exist|> cobined with <http://www.mathworks.co.uk/help/te...

14 years ago | 0

Answered
Elementwise comparison
There's no logical elementwise operator since they already require the array to match dimensions. Thus, one way is to replica...

14 years ago | 1

| accepted

Answered
Zscore array subset
You won't be able to use <http://www.mathworks.co.uk/help/toolbox/stats/zscore.html |zscore|> in a one-liner: _"Z = zscore(X)...

14 years ago | 0

| accepted

Answered
calculate the mean of several columns
A = rand(100,112); B = reshape(mean(reshape(A.',7,[])),16,100).'; % Check isequal(mean(A(2,8:14)),B(2,2))

14 years ago | 4

Answered
How to do an outer join?
Since you're talking about joins I will use the Statistics Toolbox: % Your data Ages = { 'Fred' 33; 'Josh...

14 years ago | 0

Answered
transforming the distribution of variables
You can call <http://www.mathworks.co.uk/help/toolbox/stats/cdf.html |cdf|> specifying the type of distribution or you can call ...

14 years ago | 0

| accepted

Answered
Referring to a specific cell in Time series object in Matlab?
fts2mat(spotprice('01/01/2010')) - fts2mat(forwardprice('05/01/2010'))

14 years ago | 1

| accepted

Answered
Passing extra parameters back through an optimisation function
If I interpret it correctly, you obtain |z_opt| and within |my_function(z,a,b)| you want to skip teh following part: r1 = r...

14 years ago | 0

Answered
Ignore output arguments (R2006a)
You cannot. This feature was introduced in *R2009b*: <http://www.mathworks.co.uk/help/techdoc/rn/br5fo8o-1.html#br65zmd-1 Ign...

14 years ago | 5

| accepted

Answered
help with regexp
s = '<td>3</td><td>2</td><td>100</td>'; out = regexp(s,'\d+','match'); cellfun(@str2double,out) |regexp| return...

14 years ago | 0

| accepted

Answered
structure to array
In this case no, and you have to use: for i = 1:p_diff t_array(i,:) = {s.test1(i) s.test2(i) s.test3{i}}; end ...

14 years ago | 0

Answered
UCSD - GARCH Package of Kevin Sheppard. Multivariate GARCH models
You have to add the the folders (and subfolders) where the package is to the MATLAB path: |File > Set path > Add with subfold...

14 years ago | 0

| accepted

Answered
problem with time series objects
h = ylabel('Jm^{-2}'); set(h,'interpreter','tex')

14 years ago | 1

| accepted

Answered
need help optimizing this code...
I would however use a loop: ws = w.*s; wssw = bsxfun(@times,ws,ws.'); sum(wssw(~eye(n)))

14 years ago | 0

Answered
display colored output in command window
You can use this submission from the FEX: <http://www.mathworks.com/matlabcentral/fileexchange/24093-cprintf-display-formatted-c...

14 years ago | 1

Answered
how put xlsread in global variable
There are many ways to <http://www.mathworks.co.uk/help/techdoc/creating_guis/f13-998449.html Share Data Among a GUI's Callbacks...

14 years ago | 0

Answered
Changing enable field in GUI property inspector
set(handles.ions_dir, 'Enable', 'off')

14 years ago | 1

| accepted

Answered
blockproc
@(x) faddpn(x,messagevector)

14 years ago | 0

Answered
How do I use an array of files?
Implement these changes: % Fname as a cell array of strings fname = {'Specimen_RawData_1.xls',... ...} ...

14 years ago | 0

| accepted

Answered
create plot without x y data, draw plot line just like paint on matlab
GUI_39 from <http://www.mathworks.com/matlabcentral/fileexchange/24861 41 Complete GUI Examples>

14 years ago | 0

Answered
Some issue with recessionplot(.) function of 2012a
Old bug (although it seems it's not reported): set(gcf,'renderer','zbuffer'); But it doesn't support transaprency of the...

14 years ago | 0

| accepted

Answered
selective legend
One object per legend entry: % Colors M1 = ones(size(freeBoundary(dt1),1),1); M2 = 2*ones(size(freeBoundary(dt1),1),1...

14 years ago | 1

| accepted

Answered
Quick Question - Clean up code
PO = 0.15; syms s Dratio = double(solve(exp(-pi*s/sqrt(1-s^2))-PO)); Dratio(Dratio > 0)

14 years ago | 0

| accepted

Answered
BISETION METHOD
Has nice section with MATLAB code: <https://ece.uwaterloo.ca/~dwharder/NumericalAnalysis/10RootFinding/bisection/> Submission...

14 years ago | 1

Answered
Matlab from Command promt
matlab -nosplash -nodesktop -minimize -r "a = myfun5(3), exit" -logfile C:\logfile.txt where function F = myfun5(x) ...

14 years ago | 0

| accepted

Answered
Creating input options based on a number
There is but you have to program it yourself: * write completely the whole GUI, using also jTextField (java) in place of the ...

14 years ago | 0

| accepted

Answered
Is "matlab" or "matlab code" a useful tag?
I tend to replace "matlab_code" whenever I can with what I suppose could lead to an answer. Sometimes the lack of info is suc...

14 years ago | 2

| accepted

Answered
ranking (ordering) values with repeats
If you have the Statistics Toolbox, but it's kinda an overkill: floor(tiedrank([-1 2 0 -2 0])) ans = 2 5 ...

14 years ago | 3

| accepted

Answered
Undefined function or variable 'xyz'
Let's see what's the problem, unrecognised function or unrecognized variable (I admit these error messages should be rewritten):...

14 years ago | 1

Answered
sortrows with cell array
Convert the string of numbers to doubles. bulk_list = {'BULK' 'ED' '2011' '12' 'Default' 'B' '18' 'BULK' 'ED' '2011' '9...

14 years ago | 0

| accepted

Load more