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

All
  • Most Accepted 2021
  • Roberson Cup
  • Solver
  • First Review
  • Most Accepted 2019
  • Most Accepted 2018
  • Most Accepted 2017
  • 36 Month Streak
  • Most Accepted 2016
  • Most Accepted 2015
  • Most Accepted 2011
  • Most Accepted 2012

View badges

Content Feed

View by

Answered
Extract segments of 1's from binary matrix
You can bwconncomp and pass in a connection array that is a central row or central column of 1s. You would do that twice, once f...

alrededor de 4 horas ago | 0

| accepted

Answered
Array indices must be positive integers or logical values.
Remember that MATLAB has no implied multiplication, so your code is asking to take 1 divided by (Nt indexed at something), where...

alrededor de 5 horas ago | 0

Answered
Finding Maximum Consecutive Dry Days in Daily Rainfall Data
This code shows one way of finding all the runs of maximum length. rng(12345) drf = rand(366,1); % mocking up some daily rainf...

alrededor de 6 horas ago | 0

Answered
related to the fprintf
number_of_shoes = 4; for shoe_number = 1 : number_of_shoes filename = sprintf('SCRW;NAME;SCRW_%d', shoe_number) end

alrededor de 6 horas ago | 0

Answered
How to I create variables with different names in the workspace using for loop?
Please read http://www.mathworks.com/matlabcentral/answers/304528-tutorial-why-variables-should-not-be-named-dynamically-eval fo...

alrededor de 6 horas ago | 0

Answered
num2char? dpath?
<http://www.pages.drexel.edu/~dml46/Projects_Genomic_Coding.html> has code for a function named num2char. It is not clear wh...

alrededor de 10 horas ago | 0

Answered
do specific work after a specific warning
https://www.mathworks.com/help/matlab/ref/lastwarn.html Use lastwarn, especially the two-output version that lets you get the...

alrededor de 14 horas ago | 1

Answered
Real-Time Controller with DAQ
Within limitations, yes. I have not done this myself, but I have seen people mention having done it. There are at least three...

alrededor de 14 horas ago | 0

| accepted

Answered
Storing info of an averaging automated process into an array without extra values
A numeric array cannot store different number of values according to row. You would need a cell array for that.

alrededor de 15 horas ago | 0

Answered
Image compression channel not working
IMAGEBIN=im2bw(im,0.4); im2bw returns logical data encodedData = step(enc, IMAGEBIN(:,[1])); That kind of encoder d...

2 días ago | 0

| accepted

Answered
grey image color restoration after image subtraction
mask = repmat(all(Subtracted == 0, 3), 1, 1, 3); Subtracted(mask) = Original(mask);

3 días ago | 0

Answered
Concatenate together two cell arrays
BB = cellfun(@(c,d) [c;d], CC, DD, 'uniform', 0);

3 días ago | 1

| accepted

Answered
I tried to solve 6 couple differential equation, and getting an error which is " Index exceeds the number of array elements. Index must not exceed 2."
x = tspan(1):h:tspan(6); That line is expecting that tspan is a vector or array with at least 6 elements Working backwards f...

3 días ago | 0

| accepted

Answered
Why do I recieve an error when trying to change the Line Width of a plot line?
https://www.mathworks.com/help/curvefit/cfit.plot.html#namevaluepairarguments plot() of cfit or sfit objects is not the regula...

4 días ago | 0

Answered
Error using integer wavelet transform
[cA, cH, cV, cD] = lwt2(double(data), 'LiftingScheme', liftscheme);

4 días ago | 0

Answered
How to check the function call stack during the debugging process
What you might be running into is that callback functions are considered to not have a calling function. Each callback is execut...

4 días ago | 0

Answered
how to padding array with zeros to limit rows (I can choose the limit)
[AB; zeros(21-size(AB, 1),size(AB, 2))]

5 días ago | 0

| accepted

Answered
How do you remove x-axis tick marks and keep the numbers?
plot(rand(1,20)) ax = gca; ax.XAxis.TickLength = [0 0.1];

6 días ago | 0

Answered
How to write code for solving system of nonlinear inequality
x=-10:1:10; for i=1:length(x) if x(i)>=0 y(i)=6*x(i)^2-5*x(i)+14; elseif x(i)>10 disp('x out of ran...

6 días ago | 0

| accepted

Answered
How do I find the index of the first element equal to 0 for each row of a matrix in a fast way
You cannot do it with a single find() A vectorized way to do it is M = ones(5,10); M(randperm(50,10)) = 0; M idx = sum(cum...

6 días ago | 0

Answered
Using a for- loop to extract a range of columns every n-columns
data = rand(64,10000); startcols = 1:2000:size(data,2)-1999; for w = 1:length(startcols) sc = startcols(w); extrac...

6 días ago | 0

| accepted

Answered
What is a comparison of m file and livescript file?
Livescript can insert text and equations as narration Livescript inserts plots "in-line" or to the right hand side, instead of ...

6 días ago | 0

| accepted

Answered
Is there a way to modify the path for ".." ( shortcut ) ?
You can change the startup folder; see https://www.mathworks.com/help/matlab/matlab_env/matlab-startup-folder.html The effect ...

6 días ago | 0

Answered
How add my folder '+op' to the path Matlab?
You can never add a + folder to the MATLAB path. Instead, you add the folder containing the + folder.

6 días ago | 0

| accepted

Answered
Spit an array when the value 0 occurs until the value 2
Your request is a bit ambiguous, so I will give two possibilities. loc0 = find(YourArray == 0, 'first'); %use this loc2F = ...

6 días ago | 1

Answered
How to save an app property to an .m file?
When you save() with -struct then the name that you give must be the name of a full variable. That is, copy app.dataPaths to a ...

6 días ago | 0

| accepted

Answered
run matlab help function_name from terminal
matlab -nodisplay -nodesktop -r "help function_name"

6 días ago | 0

Answered
How do i get multiple values all at once from cell array?
Your options: loop cellfun arrayfun (effectively the same as cellfun) cell2mat to form a 3d array, and then index; this is v...

6 días ago | 0

Answered
能不能把下面储存在元胞里面的t(i)换成具体的值,是不是有强制计算什么的
t=[1 2 3 4 5] for i=1:4 cmd = sprintf('@(a)%.16g.^a-%.16g.^a', t(i+1), t(i)); F{i} = str2func(cmd); end F

6 días ago | 0

| accepted

Answered
FAQ: Why is 0.3 - 0.2 - 0.1 not equal to zero?
Consider any finite-length positional notation with a fixed base, B. For example, base 10 and 0.193 meaning 1 * 10^-1 + 9 * 10^-...

6 días ago | 1

Load more