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.

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
Write a function that checks whether an element occurs in a list.
function Checking(x) if ismember(x, [1,3,5,8,9]) disp('It is an element') else disp('Not an element') ...

1 hour ago | 1

Answered
Why is my nested if statement is not working.
elseif (80 <= mark1 < 90) As far as MATLAB is concerned, that means the same as elseif all((80 <= mark1) < 90, 'all...

2 hours ago | 0

Answered
How to read .m4a and .wv audio file formats in matlab 2015b ?
R2015b did not directly support reading .m4a files on MS Windows -- only on Linux and Mac. It did, however, say that files sup...

3 hours ago | 0

Answered
the absolute bleed edge fastest way to strip out bits from 4 bytes of hex
The absolute top dog in speed is to have (y-x+n-m+2) different 8 dimensional lookup tables, each of which is (102 x 102 x 102 x ...

19 hours ago | 0

Answered
How to check the symbolic engine of matlab2018?
If you are trying to determine whether you are using maple based symbolic toolbox or the MuPad based one then you cannot use sym...

19 hours ago | 0

Answered
Obtain 2x2 regions in an image using sliding window
If all you are doing is "observing" the pixels, then a double-nested loop is probably easiest; the time taken to "observe" them ...

1 day ago | 1

| accepted

Answered
How can I execute the “sound” function in matlab and then execute the rest afterwards? (Blocking)
sound() cannot be made blocking. In your situation, if you have the DSP toolbox then dsp.AudioDeviceWriter https://www.mathwork...

1 day ago | 0

| accepted

Answered
fsolve residue almost zero error, I calculate and find errors
I speculate that you have format short in effect (because it is the default), and that you are taking the 4-decimal-place res...

1 day ago | 0

Answered
Convert an array of type char to hex values
I showed you a number of different methods in https://www.mathworks.com/matlabcentral/answers/888752-quickest-way-to-convert-hex...

1 day ago | 0

Answered
Cell array of matrices to multi-dim matrix
k = randi([3 6], 1) j = randi([3 6], 1) c = randi([3 6], 1, k) m = randi([2 5], 1, j) C = cell(c); C = cellfun(@(~) randi(9...

2 days ago | 0

Answered
How to count the numbers before consecutive negative values?
c = [ 0.4855 -0.1902 -0.1758 0.3935 -0.1264 -0.1274 -0.0914 -0.1149 -0.0930 0.5572 0.5098 1.0000 ....

2 days ago | 0

Answered
Replacing function variables with a vector before taking a gradient
syms x1 x2 x3 x4 real syms C1_0 C2_0 x=[x1,x2,x3,x4] A = subs(A, [C1, C2, R1, R2], [C1_0, C2...

2 days ago | 0

| accepted

Answered
How should i solve a system of non-linear equations and then plot the interdependence of any two variables? Can i use vpasolve?
If you have equations that have a finite number of solutions, then: * if the equations are multinationals then in theory matl...

2 days ago | 0

Answered
do not figure out errors in xlim
z2 is the last entry from z1. The last entry from an array cannot be strictly greater than the array: it is guaranteed to equal ...

2 days ago | 0

| accepted

Answered
Install add-ons through commandline/headless?
It is possible, using matlab.addons.install() https://www.mathworks.com/help/matlab/ref/matlab.addons.install.html However, t...

2 days ago | 0

Answered
how to get the position of a line in from a 2D matrix data.
See improfile() https://www.mathworks.com/help/images/ref/improfile.html#d123e161936 Note that you pass in endpoints of line s...

2 days ago | 0

Answered
How to do iteration until certain tolerance is achieve?
while abs((psic/psit)+(1/(2*sigma)))<tol That tells us that you are looking for (psic/psit)+(1/(2*sigma)) to become as close to...

3 days ago | 0

| accepted

Answered
How do I gapfill a vector only if gaps (NaNs) are 10 elements or less?
format short N = 10; x = [1,2,3,5,7,9,10,9, NaN,NaN,5,3,2,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,NaN,12,13,14,15,16]; mask...

3 days ago | 0

Answered
Getting different results from function handle & syms for a same equation. How to avoid it?
Remember that when you mix floating point numbers into a symbolic expression, that MATLAB uses the default conversion of floatin...

3 days ago | 0

Answered
fsolve stopped because the problem appears regular
format long g omega0=2*pi*599.585e12; data=(2+0.5i)^2; syms x [1 2] rf = rfpnk(x,omega0,data) sol = solve(rf) [sol.x...

3 days ago | 0

| accepted

Answered
Combining two surface plots
You can ax = gca; yellow = surf(ax, x, p, a); hold(ax, 'on') M = [1 0 0 1; 0 0 1 0; 0 1 0 0; 0 0 0 0]; hg = hgtransform(ax,...

3 days ago | 1

| accepted

Answered
I want to generate Three different random Communication Channels and sort it. Please help
h1=(randn(1)+1j*randn(1)); h2=(randn(1)+1j*randn(1)); h3=(randn(1)+1j*randn(1)); z=sort([h1,h2,h3]) Note that by default, so...

3 days ago | 0

| accepted

Answered
What is the difference between the effect of clear and clearvars?
@Kien Pham asked above whether there was a timing difference between clear and clearvars. The answer astonished me: there is a ...

3 days ago | 1

Answered
plz help how can use go to in MATLAB
MATLAB itself does not have a GO TO, and never will. Simulink diagrams sort of have a GO TO but it does not affect flow of co...

3 days ago | 0

Answered
Getting error message, "Execution of script bar as a function is not supported".
which -all bar will show you that you have a bar.m in your path that is not the Mathworks bar function

3 days ago | 1

| accepted

Answered
How do I get a "≤" sign to appear in my function's HELP documentation?
<= is not part of CP1252 https://en.wikipedia.org/wiki/Windows-1252 I am using 2016b In that release, MATLAB did not use UT...

3 days ago | 0

Answered
how to count further?
Where do you transition from state2 to something else? Are you trying to count all the rising edges, ignoring the falling edges...

3 days ago | 0

Answered
quickest way to convert hex to a 16 bit signed integer
format long g N = 100000; HC = ['0':'9', 'A':'F']; data = HC(randi(16, N, 4)); timeit(@() typecast(uint16(hex2dec(data)),'...

3 days ago | 1

Answered
Left and right sides have a different number of elements
x=[11500.2 11477.9 11417.3 11426.4 11413 11382.9 11375.1 11347.9 11351.1 11329.3 11318.9 11343.4 11360.7 11378.4 11414.2 11408.2...

4 days ago | 0

Answered
Could anyone help me how to save the bar graph in png format.
%applyhatch is a File Exchange Contribution. We need to install it to %generate the graphics to demonstrate the save techniques...

4 days ago | 0

Load more