# 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 272,943

REPUTATION**128,652**

CONTRIBUTIONS

**35** Questions

**57,197** Answers

ANSWER ACCEPTANCE **
51.43%
**

VOTES RECEIVED**16,949**

RANK

of 18,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**

How can I specify the dimension of a differentiated function?

diff() is generally successive differences. It is only derivative if the first parameter is sym or symfun, both from the Symboli...

2 hours ago | 0

Finding a redundant pattern in a matrix

C1=[ 5 9 3]; C2=[ 9 5 3]; C3=[9 5 9 3]; C4=[5 9 8 3]; C5 = [5 3 9 8]; is_in(C1, C2) is_in(C1, C3) is_in(C1, C4) is_in(C1, ...

13 hours ago | 0

Connecting to USB device with serialport vs. serial command

serialport does not have any fopen() or fread() . It automatically opens the port when you create the object, and it uses read()...

14 hours ago | 0

Empty matrix, scalar, or vector function in loop

MATLAB uses == for comparisons, not = Also, X = [] Y = 1 if X == []; disp('X yes 1'); end if Y == []; disp('Y yes 1'); end ...

15 hours ago | 0

Numeric data becomes zero after conversion from Table

I predict that you have format short in effect, and that what is being displayed is not really 0 but is instead something of t...

15 hours ago | 0

| accepted

Why results of the 'solve' are wrong?

p_max=715.685424949238; (and a bunch of other numbers). What does that input mean? Does it mean that p_max is exactly ? Does ...

17 hours ago | 0

Excel sheet data upload "Invalid 'DataRange'. The column size must match the number of variables".

opts.DataRange = "A2:AT78"; That requests that column "A" to "AT" be read in. However, M1_New_Macro1.xlsx only has data up to c...

17 hours ago | 0

Logical operator not evaluating correctly

A|B is an or test and returns a logical value -1 is nonzero which is considered true, and since you or everything together you a...

19 hours ago | 0

Hi.How I can plot W_m to n connection

See <https://www.fieggen.com/shoelace/lacingmethods.htm> for some of the possible ways to plot that.

1 day ago | 0

Receiving mouse clicks in App Designer UIAxes - stops working after imshow

https://www.mathworks.com/help/matlab/creating_plots/capturing-mouse-clicks.html MATLAB considers graphics objects to be layer...

1 day ago | 0

| accepted

molecular code in matlab

There are a lot of undefined variables there. There are two possibilities: There might be another script that you have to exec...

1 day ago | 0

Need help coding this

Example. fun = @(x, y) (x + y).^3 - 5*(x.*y) - 1; [X, Y] = meshgrid( linspace(0,2)); z = fun(X, Y); contour(X, Y, z);

1 day ago | 0

I have a data 5x148992 , i have to extract data column wise and check if there is any changes wrt previous column and display when there are chnages?

for i = (data( : , : )) data appears to be a 2D array. When you have something of the form for VARIABLE = EXPRESSION; BODY;...

1 day ago | 0

| accepted

How to add Line/Markers to an Axis Label?

L = "G\prime ( \bullet ) and G\prime\prime ( \color{red}{\bullet}\color{black} ) (Pa)"; ylabel(L, 'interpreter', 'tex') See al...

1 day ago | 0

| accepted

How to calculate the symbolic integration of rational functions?

Wolfram Alpha says https://www.wolframalpha.com/input?i=int%281%2F%28x%5E4+%2B+x%5E3+%2B+x%5E2+%2B+x+%2B+1%29%2C+x%2C+0%2C+1%29&...

1 day ago | 0

Large square symmetric matrices inversion in parallel / distributed systems

Gb = 60000^2*8/1024^3 The matrix is close to 27 gigabytes. The inverse is the same size, so you will need at least 54 gigabytes...

1 day ago | 0

How to make a new column in my table

elseif requires a expression after it, but you coded an assignment. You just want else not elseif Remember that if Results(...

1 day ago | 0

Need a to plot a graph

hvals = linspace(0,17); numh = length(hvals); Vtotal = zeros(numh, 1); H1 = 11; %in H2 = 5; %in m r1 = 3.5; %in m r2 = ...

1 day ago | 0

Trial download 2021b

only Mathworks Sales can generate trials against older versions.

2 days ago | 0

how can i imagie zoom with Convolution method

It is deliberate that the following does not do exactly what you want to do. It is also deliberate that it has some extra steps ...

2 days ago | 0

How can I simplify my code using loops?

Put the channels into a cell array: lena_ch = num2cell(lena, [1 2]); Now you can loop over the rows of indices = perms(1:3) ...

2 days ago | 0

I need help writing equation in matlab

format long g syms x n m result = symsum(x^n/factorial(n), n, 0, m) limit(result, m, inf) result20 = subs(result, m, 20) ex...

2 days ago | 0

How can I make the execution speed consistent while I am testing the speed of the programs?

I am not convinced that virtual machines will be allocated dedicated resources that will not be affected by other activities. ...

3 days ago | 0

Hello, I've got the problem. Can any one help me with that error?

cond = [x(0)==0, diff(x, t)==0]; The first part of that sets a boundary condition. The second part of it says that the deri...

3 days ago | 0

how can I calculate A^n when n is a symbolic positive integer?

syms N positive integer [V, D] = eig(sym(A)) result = V*diag(diag(D).^N)/V Note those are the matrix operations *...

3 days ago | 0

| accepted

how to run a function on GPU cores

You would have to use <https://www.mathworks.com/help/gpucoder/index.html> Nvidia GPUs are constructed in a hierarchy. GPU co...

3 days ago | 1

Hi, I am trying to produce randomly circles with same radius in defined range or square. I wrote the code, but it show error " Out of memory. The likely cause is an infinite"

function h = circle(x,y,r, N) ... for i=1:1:size(circle) circle is not a local variable in the function circle, and is not th...

3 days ago | 0

Axis Ticks using Calendar Year ticks with BC years

YearTicks = datetime({'1950 CE'; '1725 CE'; '1501 CE'; '1277 CE'; '1053 CE'; '0828 CE'; '0604 CE'; '0380 CE'; '0156 CE'; '0069 C...

4 days ago | 0

| accepted

Simlify a function in matlab

syms B C x eqn = cos(x) + B*sin(x) == C expr = -sin(x) + B*cos(x) xsol = solve(eqn,x) newexpr = simplify(subs(expr, x, xso...

4 days ago | 1

| accepted