Community Profile # Walter Roberson

Last seen: Today Active since 2011

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

All
• • • • • • • • • • • • #### Content Feed

View by

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

1 hour 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...

2 hours 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...

2 hours ago | 0

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

5 hours 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...

5 hours 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...

5 hours 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...

6 hours 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...

6 hours 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 =...

6 hours 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); [...

17 hours 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 ...

18 hours 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...

18 hours 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...

19 hours 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...

20 hours 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 day ago | 0

Trying to integrate for drag
I suspect Integrate = u_wake .* (20-u_wake);

1 day ago | 1

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

1 day ago | 0

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

1 day 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...

1 day 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, [])

1 day ago | 0

| accepted

imread slower with huge tif files
Use the Tiff() class to work more directly with the tiff structure.

1 day 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...

1 day ago | 0

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()...

1 day ago | 0

Can you use the whos command to identify classes
numeric_classes = {'int8', 'uint8', 'int16', 'uint16', 'int32', 'uint32', 'int64', 'uint64', 'single', 'double'}; num_classes...

2 days 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...

2 days 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...

2 days 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...

2 days 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...

2 days ago | 0