Community Profile

photo

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 T0099089; 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
  • Roberson Cup
  • Most Accepted 2019
  • Solver
  • First Review
  • Most Accepted 2018
  • Most Accepted 2017
  • 36 Month Streak
  • Most Accepted 2016
  • Most Accepted 2015
  • Most Accepted 2011
  • Most Accepted 2012
  • Most Accepted 2013

View badges

Content Feed

View by

Answered
I want to make a matrix for each change of value
tfile = tempdir + "assign_S.m"; fid = fopen(tfile, 'w'); for K = 1 : 345 fprintf(fid, 'S%d = S; S%d(1,%d) = 2;\n', K, K, K...

2 hours ago | 0

| accepted

Answered
No 'FunctionTolerance' or 'TolFun' in gaoptimset
I just ran that code in the version you indicate, R2014b. I get a different result than you do: options = gaoptimset options...

2 hours ago | 1

| accepted

Answered
audioread() sampled data type conversion
audioread() with 'native' will only return an integer data type if the data is stored as integer internally. That is not always ...

3 hours ago | 0

Answered
rectangle command not working in a function with multiple variables in the coordinate argument
driverx = 2; drivery = 1; You do not declare those as global in the function you make the assignments in. global driverx driv...

3 hours ago | 0

Answered
for loop in if statement, changing value of matrix element depending on its nearby elements
Subtract the middle number from the entire matrix. If all of the results are less than -20 then the middle was at least 20 more ...

4 hours ago | 0

Answered
How to implement Array factor in MATLAB?
phi=[90:90:360 zeros(1,12); 22.5:22.5:360] is a 2 x 16 array. AF(m,i)=exp((1j)*(((k)*(r(m))*(sin(deg2rad(theta)))*(cos...

4 hours ago | 0

Answered
Running copies of a figure simultaneously?
Edit the .m file produced by GUIDE. Very early on, about line 25, you will see % Begin initialization code - DO NOT EDIT g...

7 hours ago | 0

Answered
for loop with multiple indices
That is not possible for the general case where N is not the same as (M-1) -- that is, if the two variables to be incremented do...

8 hours ago | 1

| accepted

Answered
Using MATLAB command can anyone solve this questio
syms A [2 2] syms b [2 1] syms x [2 1] eqn = A^2 * x == b solution = solve(eqn, x)

8 hours ago | 0

Answered
trying to stop my loop with below an error
u(i,j)=(1/4)*(u(i-1,j)+u(i,j-1)+u(i+1,j)+u(i,j+1)) You always write additional entries into u, never overwriting existing e...

11 hours ago | 0

| accepted

Answered
Add zero decimal digits in order to have all the elements of a matrix with same number of decimal digits
https://www.mathworks.com/matlabcentral/answers/1599329-insert-blank-cells-in-a-matrix#comment_1863670 I already showed you ho...

16 hours ago | 0

Answered
MATLAB codes for Network Reconfiguration using Firefly Algoritm
Yes. This is a MATLAB assignment given to students every couple of years, so someone in the world has MATLAB code for this. I d...

1 day ago | 0

Answered
Plot over a image
%Plot Sw - r^2/t figure(1) Image2011 = imread('Image2011.jpg'); image([0 1], [0 1], Image2011) colormap jet hold on semilo...

1 day ago | 0

Answered
function not working properly
The code you post only assigns to valid in situations where it has valid=~1 so it can only ever assign false (0) to valid. There...

1 day ago | 0

Answered
How to find 0 is present in any bounding box?
It is common to have more than one bounding box in an image. For example if you are tracking faces, then you would expect more t...

1 day ago | 0

| accepted

Answered
can you please help me to color the area covered by ABCD in this graph?
coud you please help me to colir the graph? fill([A_x, B_x, D_x, C_x], [A_y, B_y, D_y, C_y]); where (A_x, A_y) are the coordin...

1 day ago | 0

Answered
How to plot two 3-D figures with different axes in a single plot?
You can use subplot() or tiledlayout() to create two different visually distinct axes that are beside each other horizontally or...

1 day ago | 0

Answered
I want to find the range of kc that makes s is less than zero
syms s Kc delta real assume(delta >= 0) eqn = 16*s^3 + 280*s^2 + 1400*s + 200*Kc + 2000 == delta sol = solve(eqn, s, 'MaxDegr...

1 day ago | 0

Answered
How to switch to purchased license after using the free trial license.
MATLAB's license system is designed to let the trial have priority while it lasts, because the trial usually has additional feat...

1 day ago | 0

Answered
first time matlab user, trying to use fmincon for a simple question
S0 = 1433.32; K = 1430; r = 0.0011; T = 30/365; sigma = .15; x0 = 24.9; x = fmincon(@(y)blackScholesCallPrice(K,T,S0,r,y,sig...

2 days ago | 0

Answered
Problem with datetime in German
Observe: datetime('21.Oct.2020', 'InputFormat', 'dd.MMM.yyyy', 'Format', 'dd.MMM.yyyy') So using dots is possible for English....

2 days ago | 0

Answered
For loops in non linear equaities - fmincon
function [c,ceq] = nonlconTest(x) n = x(1); That tells us that n is one of the variables being allowed to vary. for i = 1:n ...

2 days ago | 0

Answered
how to convert 227x227 image into 227x227x3
https://www.mathworks.com/help/deeplearning/ref/augmentedimagedatastore.html with 'ColorPreprocessing', 'gray2rgb'

2 days ago | 0

Answered
Please help me identifying how this person makes his code
funct = @(x) 1-(400/9.81)*(3+x)/((3*x + 0.5*x^2)^3); secant (funct, 0.5,2.5,0.01) function xs = secant( func, x0, xi, es ) ...

2 days ago | 1

| accepted

Answered
Storing many digits using readtable
To preserve those digits, you are going to need to read the file as text and store the long numbers as either text or as symboli...

2 days ago | 1

| accepted

Answered
How can I plot a few dots in matrix plot?
[X,Y] = meshgrid(6:6:24); scatter(X, Y, 'b*') xlim([0 30]); ylim([0 30])

2 days ago | 0

Answered
x=0:pi/100:2*pi; y=sin(x); if x>3 plot(x,y,"b*") else x<=3; plot(x,y,"g*") end I Want PLot X>3 using Defferent Color
x=0:pi/100:2*pi; y=sin(x); mask = x > 3; plot(x(mask), y(mask), "b*") hold on plot(x(~mask), y(~mask), "g*") hold off

2 days ago | 0

| accepted

Answered
Plot the trajectory of a motion of x(t) and y(t)
t = linspace(0,10); X = @(t) acos(t/10) + tan(t/10); Y = @(t) (t/10).^2 + (t/10) - 1; plot(X(t), Y(t))

2 days ago | 0

Answered
Remove specific field and "push up" its contents without losing the data.
temp = rmfield(Data.c1, 'Data'); fn_temp = fieldnames(Data.c1); fn_c1D = fieldnames(Data.c1.Data); combined_cell = [struct2ce...

2 days ago | 0

Load more