# 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 T0099000; if you are waiting on a reply from me for an older issue, please send me a reminder.

**Programming Languages:**

C++, C, MATLAB, Shell, Perl, Fortran

**Spoken Languages:**

English

**Statistics**

RANK**1**

of 242,479

REPUTATION**115,706**

CONTRIBUTIONS

**34** Questions

**52,417** Answers

ANSWER ACCEPTANCE **
52.94%
**

VOTES RECEIVED**14,849**

RANK

of 16,992

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

Using variables from a .mat data file in a user-defined function

function [Message] = decipher(window,fs) if abs(X(abs(f-(350+50*n)) < .01)) > 0.015 How is the code to know ...

4 hours ago | 0

solving multiple equations with variable later

syms x1 x2 xL1 xL2 t x3 x4 x1 = 140 + xL1; x2 = 160 + xL2; eqn1 = x1 + x2 + x3 + x4 == 300 + xL1 + xL2 lhs(eqn1) - rhs(...

4 hours ago | 0

Inverse of a matrix

if n==n Under what circumstances could that be false? p==eye(n,n) %check if p is an identity matrix You are assuming there is...

4 hours ago | 0

How to determine the coefficient from the argmin function ?

n = 5; syms X [1 n] real syms Z [1 n] real syms a1 b1 c1 eqn1 = sum((Z + (a1*X + c1)/b1).^2) parta1 = simplify(solve(diff(e...

4 hours ago | 0

How to calculate needed sample size

Remember, Probability of an event occurring at least once in n tries is 1 minus the probability that the opposite event happens...

6 hours ago | 0

Unable to perform assignment because the left and right sides have a different number of elements.

global m d k; One of those variables is not initialized as a global variable. When you declare a variable to be global, it doe...

7 hours ago | 0

what to do when array indicies exceed for , FOR loop comparision for below , trying to plot density of atmosphere, how to do the comparison ?

h(1) = 0; That is the only place you assign to h if h(t)<[11000] but you need h to be 328084 elements by the end of the l...

12 hours ago | 0

I am unable to display my output for my graph.

Because MATLAB does not have endfor or endif commands. t = [0:0.01:20]; Vo = 90; angle = [10 25 45 65 85]; g = 9.81; yo = 0...

12 hours ago | 0

Error using symengine - Division by zero.

int(MassWing,y,0,44) That integral ends up with a division by (i-j) . When rows == cols that is a division by 0. You can get a...

13 hours ago | 1

| accepted

How to plot muitiple X-axis ?

There is https://www.mathworks.com/help/matlab/creating_plots/graph-with-multiple-x-axes-and-y-axes.html#mw_ca4bd216-f46d-49cd-9...

16 hours ago | 0

How to limit my x=[]; to a range of values between 0<=x<=1.

V=1000; Q=50; Fa0=1; k=1; E=-1; x=[]; fval=[]; syms x [1 2] real syms a positive f = [Fa0*x(1)-k*a*V*(Fa0*(1-x(1)))/(Q*(1+E*...

17 hours ago | 0

| accepted

Illegal use of reserved keyword "global".

Notice the ... on the line above. You are using a continuation marker on a previous line so the global is not the first thing in...

1 day ago | 0

How to use specific vector to define axis in imagesc?

Only the first and last XData and YData are paid attention to. That used to be documented explicitly; last time I looked the doc...

1 day ago | 0

How to get the calculation amount of deep network FLOPS? Analyze Network app does not seem to count this metric？

This is quite unlikely to happen in the near future, if ever. The translation of cuda calls into machine instructions depend...

1 day ago | 0

| accepted

Sum of series (infinity upper limit), only want odd number

syms N y h w z Pi = sym(pi); symsum(1/(2*N-1) * (1 - cosh((2*N-1)*Pi*y/h)/cosh((2*N-1)*Pi*w/(2*h))) * sin((2*N-1) * Pi * z/h),...

2 days ago | 0

| accepted

Can anyone please help me with the error in the code

clc, clear all, close all d=sin(0.05*pi*(1:200)+2*pi*rand); g=randn(1,200); v1=filter(1,[1 -0.8],g); v2=filter(1,[1 0.6],g);...

2 days ago | 1

"Unable to perform assignment because the left and right sides have a different number of elements error" using find command

reference=[1 2 3 4 5 6 8 9 10]; target=[1 2 3 4 6 7 8 9 10 3 8]; index = []; complete_reference = []; for i=1:9 thisref...

2 days ago | 1

| accepted

Showing me wrong Matrix Size.

N= cell2mat(fds.Files); The Files field of a FileDataStore is a cell array of character vectors that holds file names. When you...

2 days ago | 0

| accepted

Replace number with text

Adjust to suit A = magic(7); newA = num2cell(A); mask = mod(A,5) == 0; newA(mask) = {'NO'}; newA

2 days ago | 0

Not getting Error message

AnEmptyString = ''; str2double(AnEmptyString) When you str2double() something empty, you get NaN, not empty. You need to check...

2 days ago | 0

Have problem in solution

Erf=[0.2 0.6 0.7333]; Erf is a vector. y=(-0.3725*(Erf)^2)+(1.2144*(Erf))+(0.0006); You have Erf^2 . But in MATLAB, the ^ ope...

2 days ago | 0

How to resolve the license manager error -21

The administrator of the license server needs to update the license manager software. There is nothing you can do on your side e...

3 days ago | 0

Display variable that user requests

Perhaps just give them the Workspace Browser? https://www.mathworks.com/help/matlab/ref/workspace.html You can find the names ...

3 days ago | 0

| accepted

How to view jpeg image like can scroll

https://www.mathworks.com/help/images/add-scroll-panel-to-figure.html You can use montage() to display multiple images, or you ...

3 days ago | 0

The following error occurred converting from sym to double: Unable to convert expression into double array.

When you created NM, you created it as a numeric array. You cannot "upgrade" a numeric array to be symbolic by assigning symboli...

3 days ago | 0

| accepted

The enviinfo function was used incorrectly, I don't know what went wrong.

It appears that the data file has a header that is Exposure (Ms) . This is not a standard ENVI header, but MATLAB tries to put...

3 days ago | 0

How to put a legend in Scatter3 Plot?

scatter3(score_PCA(:,1), score_PCA(:,2), score_PCA(:,3), 15, label, 'filled') That generates one graphical object legen...

3 days ago | 0

| accepted

Placing a slider control on a surf plot?

You are using surf() and you are not passing in an axes handle to surf(). In that combination, surf() is going to use gca() to...

3 days ago | 0

| accepted

integration of erf function

syms c p d cpd u x real Pi = sym(pi); phi(cpd) = 1/sqrt(2*Pi) * int(exp(-x^2/2), x, -inf, cpd) f = int(exp(-p)*phi(c*p+d), p,...

4 days ago | 0

| accepted

read unstructured data with readtable function

The table is fixed width. Use fixed width import options; https://www.mathworks.com/help/matlab/ref/matlab.io.text.fixedwidthimp...

4 days ago | 0