Community Profile

photo

Walter Roberson


43 357 total contributions 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.

Contact

Walter Roberson's Badges

  • Most Accepted 2018
  • Most Accepted 2017
  • 36 Month Streak
  • Most Accepted 2016
  • Most Accepted 2015
  • Most Accepted 2011
  • Most Accepted 2012
  • Most Accepted 2013
  • Thankful Level 4
  • Grand Master
  • Revival Level 4
  • Knowledgeable Level 4
  • First Answer
  • Solver

View details...

Contributions in
View by

Answered
how to call the vector from the work space
MS = {M1, M2, M3, M4, M5, M6, M7, M8, M9, M10, M11, M12, M13, M14, M15, M16}; MS(data) The result will be a 1 x 5 cell array t...

environ 11 heures ago | 0

Answered
ttest2 not working in Matlab 2019a
You have your own (or some third-party) nanmean.m file . Notice the error is on line 43 of nanmean. The Mathworks provided nan...

environ 12 heures ago | 0

| accepted

Answered
Ask about matlab code line by line
this line mean login to server and find the line with "mat water" and give that line equal to command_output_1, Am I right? Sou...

environ 12 heures ago | 0

Answered
string convert to binary 8
bit_vector = reshape((dec2bin(uint8(TheCharacterVector), 8) - '0').', 1, []);

environ 18 heures ago | 0

Answered
How to convert matrix indexes to cartesian coordinates
Matrices are just arrays of values and there is no inherent Cartesian coordinates associated with them. They have rows and colum...

environ 20 heures ago | 1

Answered
interp1 for matrix
No you should use interp2 for this. The value to look up depends on two factors, depth and time, but interp1 would only take one...

environ 20 heures ago | 0

Answered
cannot receive udp packet
This is what you asked for. You deliberately configured udp to read across datagram boundaries until it sees a termination chara...

environ 20 heures ago | 0

Answered
Hi, I am trying to obtain accelerometer data from a GY-521 board through solely matlab, rather than using arduino code. I am a beginner to I2C and arduino, and would appreciate some help in obtaining this data. Many thanks.
This is not typically possible. Most systems do not have i2c connectors directly available. MS Windows does support the possi...

environ 20 heures ago | 0

Answered
Error "using symengine>@()0.0" in ODE Solver
When you call matlabFunction pass 'vars', r

environ 21 heures ago | 0

Answered
fminsearch of the sum of an array of anonymous functions with two inputs?
z1 = @(par) (log(RO)-log(par(1)))*par(2); so z1 is defined with one argument. L_W_temp{i} = @(par) -e(z1(par(1),par(2))); ...

1 jour ago | 1

| accepted

Answered
How to get the longest consecutive values in a column vector and the position at which it starts
https://www.mathworks.com/matlabcentral/fileexchange/41813-runlength

1 jour ago | 0

Answered
I want the code to randomize the rows and present each row for 10 times
Decentration = [0, 0.5; 0, 0; 0, -0.5; -0.5,0; 0.5, 0]; trial = 10; n = size(Decentration, 1); idx = repmat(1:n, 1, trial); ...

1 jour ago | 1

Answered
How can i use the ceil function rightly?
>> 2.7/0.3 - 9 ans = 1.77635683940025e-15 so ceil() is correct. As to why 2.7/0.3 is not exactly 9, see http://mat...

1 jour ago | 0

Answered
quenstion about uiload in matlab
The uiload call is going to prompt the user to select a file, and then it is going to guide the user to import variables from th...

1 jour ago | 0

| accepted

Answered
Time reading in matlab
%set up opt = detectImportOptions('1932.catalog', 'FileType', 'text', 'readvariablenames', false, 'HeaderLines', 10); opt = se...

1 jour ago | 0

Answered
Help in creating function , built in equation
syms x y; eqns = damontwo(x,y); solve(eqns) %% function function yin = damontwo(x,y) yin(1) = input('Enter first equ...

2 jours ago | 0

Answered
Problem with indefinite integral
https://www.mathworks.com/help/symbolic/int.html#btydjvs-2 TIPS Results returned by int do not include integration constants....

2 jours ago | 0

Answered
Initial guess Error using fsolve
NZ = @(a,b) a ./ (b + (a==0 & b == 0)); myfun=@(y) exp(-s2^2./2).*exp(y*s2).*NZ(1-qfunc((t1(i)-s1-rho*y+rho*s2)./sqrt(1-rho^2))...

2 jours ago | 1

| accepted

Answered
XMAX must be a floating point scalar in double integral. Kindly help.
ai=a-2*(N-1)*wd-2*(N-1)*s:2*(wd+s):a-2*(N-N)*wd-2*(N-N)*s Notice the colon operators. Your ai is going to be a vector. Like...

2 jours ago | 0

| accepted

Answered
Only getting the last iteration from for loop?
ar0 = zeros(100,n); int = zeros(100,n); Okay, looks like you want to create outputs named ar0 and int for r = 1:n int = fd0....

2 jours ago | 0

| accepted

Answered
using solve for solving self and mutual inductance of a pmsm
Using a different programming package, I find that the solution is Lm is anything positive Pi = pi in the below w = (50000*co...

2 jours ago | 0

Answered
Solving Inequalities greater than and smaller than at the same time
In sufficiently recent versions you can code solve(-15< 10*S < 15, S) However this is not documented and not recommended. It i...

2 jours ago | 0

| accepted

Answered
. Find a MATLAB built in function that is used to find the lowest common denominator of fractions.
[n1, d1] = rat(1/4); [n2, d2] = rat(1/10); com = lcm(d1, d2); Now that you have the least common multple of the denominators,...

2 jours ago | 0

Answered
How to catch the error thrown when unable to connect to an arduino?
>> try; arduino("/dev/cu.Bluetooth-Incoming-Port"); catch ME; disp('nan nan nah'); end nan nan nah The particular exception is...

3 jours ago | 0

| accepted

Answered
How to crop specific portion of a grayscale image?
img = imread('gray4.jpg'); im = imclearborder(255-imclearborder(255-rgb2gray(img)));imshow(im); hc = sum(im,2); mask = hc >= ...

3 jours ago | 0

| accepted

Answered
MOD for optimization variable
Introduce an extra integer variable and constrain equality x-3*extra = 1

3 jours ago | 2

Answered
how to make data packets from digital signals
https://www.mathworks.com/help/dsp/ref/buffer.html

3 jours ago | 0

Answered
how can I compare the length of two arrays?
You can look at length() However, you need to be careful about how you define length of an array. How does the length of 1 2 ...

4 jours ago | 0

Answered
How to calculate average intensity of the image given in the form of a matrix?
mean2(TheArray)

4 jours ago | 1

| accepted

Answered
Recording sound while acquiring data from pressure sensor that connected with arduino
You would use record(), which will permit you to continue running. You would set up a recording duration ahead of time. However...

4 jours ago | 0

Load more