# 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 265 533

REPUTATION**126 079**

CONTRIBUTIONS

**34** Questions

**56 187** Answers

ANSWER ACCEPTANCE **
52.94%
**

VOTES RECEIVED**16 503**

RANK

of 18 135

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**

Which optimisation technique is the best and what is difference between metaheuristics and machine learning?

Suppose that you have a nonlinear function with multiple local minima, and you want to optimize it to find the global optimum. ...

environ 8 heures ago | 0

Constraint problem in Problem-based optimization live task

Notice that when you assign to problem.Constraints, you are asking to execute constraintFcn with those parameters, and the const...

environ 17 heures ago | 0

I have troubles in for loop with 2 variables.

"Therefore I think it should be 29 values but it has 30 values." But you said that when n = 30, x=1,2,3,...,30 -- which is 30 v...

environ 17 heures ago | 0

| accepted

How to read Excel files with unknown number of header rows?

I notice you are using R2019b. Starting with R2019a, you can use readcell . Then you would ask isnumeric(T{2,1}) to determine wh...

environ 17 heures ago | 0

| accepted

Newer Matlab versions assign sequence of plot handle double-values in a code-dependent way

I am not clear on why you would do this, instead of relying on the Children order of the axes? Are you re-ordering the Children ...

environ 20 heures ago | 0

| accepted

Is there a way to solve a system of nonlinear equations without the optimization toolbox (fsolve) or symbolic math toolbox (sym)?

Systems of equations can often be turned into a minimization. A = 4*kappa B = 2*alpha/(rho*c*A) D = -(r^2) % Equations eqn...

environ 20 heures ago | 0

How can I force a MATLAB plot with two y-axes to have 0 at the same height for both axes?

To have the plots have a common origin, you need to adjust the ylim() for one or both plots such that the first value for the se...

environ 20 heures ago | 0

is it possible for if/ else if statements to accept multiple string inputs?

if ismember(solid, {'yes', 'YES'}) but consider instead if strcmpi(solid, 'yes') the i in strcmpi means case-insensitive -- s...

environ 21 heures ago | 1

How to work variables outside function

People often ask to be able to get a copy outside the ode function of all of the values they computed inside the ode function. I...

environ 21 heures ago | 0

I have a .txt file that I need to turn into a vector

filename = 'Grades.txt'; %first create an example file example_data = "2 4 3 4"; writelines(example_data, filename); dbtyp...

environ 22 heures ago | 0

How can I add a letter to a column of strings. For example i want all names in the column one to change to this Name T.

%build an example table sourceletters = 'A':'P'; FirstColumn = string( sourceletters(randi(numel(sourceletters), 5, 7))); T =...

environ 22 heures ago | 1

| accepted

linear inequality constrains based on absolute values

x = linspace(-0.005, 0.005, 100); y = linspace(-0.005, 0.005, 101).'; M1 = x + y <= 0.1*abs(x); M2 = x + y >= -0.1*abs(x); [...

1 jour ago | 0

Neural network (NN)

net=newff(minmax(pn),[20,10,1],{'logsig','logsig','purelin'},'trainlm'); You are missing a parameter. The {'logsig'} and so on ...

1 jour ago | 0

| accepted

Im trying to use the integral function without any success...

In the symbolic toolbox, int() and solve() attempt to give indefinitely precise closed-form solutions. If int() is not able to f...

1 jour ago | 0

how can I plot the fourier series of this function by calculating the coeffcients and for different n?

an = zeros(1,n); i = 1 : n; mask = mod(4,i) == 3; an(1,mask) = -2./i(mask) * pi; mask = mod(4,i) == 1; an(1,mask) = +2./i...

1 jour ago | 0

How to open External Program by MATLAB?

system('"C:\Program Files\Bentley\Offshore\MAXSURF CONNECT Edition V23\MaxsurfModeler64.exe" &'); That is, if you put an & at t...

1 jour ago | 0

| accepted

trying to select multiple files to use in multiple s-parameter plots. I can see the file name when I manually use file1{1,2} but sparameters doesn't like it.

DefPath = 'C:\tmp\new anenna stuff\*.s4p'; [FileNames, PathName] = uigetfile(DefPath,'MultiSelect','on'); if...

1 jour ago | 0

Find longest pattern of [1 0] in array.

The below code will find all of the subsets of maximum length (I do not assume that it will be unique) The union() are present ...

2 jours ago | 1

| accepted

How to code for summation?

Your sin(x) term is constant in n, so you can move it outside the summation. x = -pi:0.01:pi; sx = sin(x); factor = cumsum(2....

2 jours ago | 2

| accepted

MATLAB R2017a does not recognize a Visual Studio 2015 redistributable Compiler

https://www.mathworks.com/content/dam/mathworks/mathworks-dot-com/support/sysreq/files/SystemRequirements-Release2017a_Supported...

2 jours ago | 1

All Combination of Matrices from two single values

values = [1 2]; N = 3; outputs = reshape(values(dec2bin(0:2^(N^2)-1).' - '0' + 1), N, N, [])

2 jours ago | 0

| accepted

imread slower with huge tif files

Use the Tiff() class to work more directly with the tiff structure.

2 jours ago | 0

My shifting algorithm does not work at all cases. Could someone please give me feedback what's wrong at my code?

shift = shift_max * (shift/shift_max - round(shift/shift_max)); shift_max is not a power of 2. When you divide by something...

2 jours ago | 1

Solution of radical equation

We would not know if the code is correct as you did not show us the equations. We would, for example, not know whether the sin()...

2 jours ago | 1

Can you use the whos command to identify classes

numeric_classes = {'int8', 'uint8', 'int16', 'uint16', 'int32', 'uint32', 'int64', 'uint64', 'single', 'double'}; num_classes...

3 jours ago | 1

| accepted

How to create TCP IP Server in MATLAB R2020b without using tcpip command as it states it is not recommended.

tcpserver was introduced in R2021a . You appear to be asking what should have been used in R2020b -- the release before tcpserv...

3 jours ago | 0

plotting this program is causing a problem how to fix it?

[y(4),y(5),y(6)] = meshgrid(-4:0.25:4,-4:0.25:4,-4:0.25:4); You want y(4), y(5), y(6) to each represent a matrix of values. You...

3 jours ago | 0

| accepted

Fit a line and integration

You are asking for normalization. When you do that, coeffvalues are the coefficients for the normalized independent variable, no...

3 jours ago | 0

| accepted

How to assign column headings to .mat file?

It is not possible to add column headings to a mat file. However you can create a table() object and store it in the mat file...

3 jours ago | 0