# Walter Roberson

I do not do free private consulting. If you want to bring my attention to something, send a link to the MATLAB Answers location. I am currently caught up to T0099119; if you are waiting on a reply from me for an older issue, please send me a reminder.

**Programming Languages:**

C, MATLAB, Shell, Perl, Fortran

**Spoken Languages:**

English

**Statistics**

RANK**1**

of 287,878

REPUTATION**135,101**

CONTRIBUTIONS

**37** Questions

**59,782** Answers

ANSWER ACCEPTANCE **
48.65%
**

VOTES RECEIVED**18,148**

RANK

of 19,434

REPUTATION**N/A**

AVERAGE RATING**0.00**

CONTRIBUTIONS**0** Files

DOWNLOADS **0**

ALL TIME DOWNLOADS**0**

CONTRIBUTIONS**0 Posts**

CONTRIBUTIONS**0** Public Channels

AVERAGE RATING

CONTRIBUTIONS**0** Highlights

AVERAGE NO. OF LIKES

**Content Feed**

Matlab error how to fix?

You cannot fix your code. It is not possible to create a uniform array in which the first column is datetime and the second colu...

4 hours ago | 0

| accepted

Fourier sine series plotting first term, first five term, and first 15 terms on one graph

x = 0:0.1:25; n = 1; ysin = fsin(x,n); plot(x,ysin) hold on n = 5; ysin = fsin(x,n); plot(x,ysin) hold on n = 15;...

21 hours ago | 1

| accepted

how to filter data by date?

FilteredDataRealizedVol = FilteredDataRealizedVol(FilteredDataRealizedVol{:,1} <= datetime(2016,7,18),:);

21 hours ago | 0

| accepted

Why am I getting the error "Too many output arguments"?

You do not initialize error before you use it. error happens to be the name of an important Mathworks function -- a function th...

1 day ago | 1

GA does not solve problems with integer and equality constraints

What you have to do is not declare [1 3 5 7] as being integer valued, and instead declare your own MutationFcn and CrossoverFcn ...

1 day ago | 0

Use of fmincon to minimise function with varying parameters, but receives 'Not enough input arguments'

[xOpt,fval,exitflag,output,lambda,grad,hessian] = fmincon(@(x) minCostFunction_b(x,parb),xInitial,[],[],[],[],xMin,xMax,@nonline...

1 day ago | 1

| accepted

How to simplify infinite double matrix summation in Matlab.

beta = 1.5; A = [1 0;0 2]; R = [0 3; 1 1]; syms k l t f = ((-A)^k./factorial(k)).*((factorial(k+l).*(-R)^l)/gamma((2-beta).*l....

1 day ago | 1

| accepted

length error don't know why

The error is not due to length(). The error is due to having run EDwithNetwork() without providing enough parameters In particu...

2 days ago | 1

| accepted

Tracking failed integral2() inside a for loop

Just before the integral2() call warning(''); Just after the integral2 call [msg, lastID] = lastwarn(); If msg is empty then...

2 days ago | 0

| accepted

How to convert radian to degree from answer (or equation) generated from syms

Q = @(v) sym(v); Pi = sym(pi); %% INPUTs: E = Q(2)*10^11; % Young's Modulus (in N/m/m) I = Q(3)*10^-3; % Moment of...

3 days ago | 0

How to recover corrupted *.mat file data

Unfortunately those files are not in .mat format and cannot be recovered. Both files start with the same sequence of 8 bytes, b...

3 days ago | 1

| accepted

Error using plot Vectors must be the same length.

t = (0:(N-1))/fs; s1 = sin(2*pi*10*t); s2 = sin(2*pi*20*t); s = [s1, s2]; s is a row vector that is twice as long as t (sin...

3 days ago | 0

Convert polar to cartisian coordinate

pol2cart uses radians. There is no Mathworks supplied Pol2Car function.

3 days ago | 0

Transparency in scatter plot

scatter(VectorOfX, VectorOfY, VectorOfPointSizes, VectorOfColor, ... 'MarkerFaceColor', 'flat', 'MarkerEdgeColor', 'flat', ...

4 days ago | 0

missing year in timetable

The range starts 01-Dec-2020 which is after 2020-01-01

4 days ago | 0

| accepted

Solution is not unique because the system is rank-deficient | Solve Function | Syms Variable | Will be very helpful, if you can resolve this pleaseeee

You are trying to solve three equations for one variable. Although two of the equations are inequalities, solve() simply gives u...

4 days ago | 0

Want to buy toolboxes for an older version of Matlab without renewing the license

Historically the rules were: purchasing against a previous release was permitted for a period, a period that was not clearly do...

4 days ago | 0

Please help me with syntax error on line 52

% Example inputs before calling the function ne = 10; nn = 2*ne + 1; mesh.x = linspace(0, 6, nn); mesh.conn = [1:2:nn-2; 2...

4 days ago | 0

str2double with long string seems to give wrong answer

format long g str = '6879331413876961408'; num = sscanf(str, '%ld')

4 days ago | 1

| accepted

What is the requirement of opinionScores for fitbrisque?

It looks to me as if that should only happen if imds is empty.

5 days ago | 0

Find out θ in the cos(wt+θ) = A

eqn2 = solve(eqn2, theta, 'returnconditions', true); will probably return a solution that is parameterized in terms of an extra...

5 days ago | 0

I am trying to perform the second derivative test of this function I came up with

Q = @(v) sym(v); Pi = Q(pi); E = Q(9.9)*10^6; p = Q(.098); F = Q(1500); L = Q(20); g = Q(32.2)*12; I = (F*L^2)/(E*Pi^...

5 days ago | 0

| accepted

The problem with calculating multidimensional integrals

Each layer of integral() that you call passes in a variable-length vector of values. trigl_funcs = @(e) cos( integral(@(zz_...

5 days ago | 0

Verify the File Path Check File Existence Verify File Permissions Check File Identifier Error Handling for File Openingwith thermo dta to matlab

[f1, msg] = fopen(file_path, 'r'); % Check if file opening was successful if f1 == -1 error('Cou...

5 days ago | 0

Multiple plots - change x axes all at once once

set(HANDLES_TO_CHANGE, {'XData'}, repmat({NEW_X_VALUES}, size(HANDLES_TO_CHANGE,1), 1));

5 days ago | 0

How to extract a matrix of values from cell array of cell arrays of structs

msea = zeros(n1,n2); for i=1:n1 msea(i,1:n2) = [mse{i}{1:n2}.metric]; end

5 days ago | 0

Getting unwanted box in the legend

The boxes in the legend are because you are using surf() You could create dummy lines, H(1) = plot(nan, nan, 'LineStyle', '--'...

5 days ago | 0

How can you determine the mean and standard deviation on a polar histogram?

You have to do something like norm_angle = Angles; mask = norm_angle > 180; norm_angle(mask) = norm_angle(mask) - 360; mean_...

6 days ago | 0

Solving and plotting equation with many variables

The solution of solve(eqn, x) is in four parts, with different conditions for each part -- conditions depending on the values of...

6 days ago | 0

Enforcing values in ODE solver

Use events, and remember that events are only detected when a value crosses the trigger, and are not detected when the system st...

6 days ago | 0