Community Profile

photo

Walter Roberson


Last seen: Today
47,234 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 2019
  • Most Accepted 2018
  • Most Accepted 2017
  • Solver
  • First Review
  • 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

View all

Contributions in
View by

Answered
How to correct unexpected behavior of `regexprep`?
?: is "group but do not capture" so the () within it do not capture. One approach: regexprep('my.file.ext', {'^([^.]+)$', '^(....

3 hours ago | 0

| accepted

Answered
Empty sym: 0-by-1
t6 = th6_;d6 = L;a6 = 0; alpha6 = 0; so t6 uses th6_ A6_= inTransMat(a6,alpha6,d6,t6); and A6_ uses t6, so A6_ uses th6_ T_ ...

5 hours ago | 0

| accepted

Answered
How to use dicomwrite after modification
You are constructing file names for all the dcm files in the directory. You iterate over each one, displaying a file name approp...

6 hours ago | 0

Answered
fmincon does not converge to the best solution?
fmincon can return a value that is worse than the initial point in some cases, especially if you are using interior-point. It wa...

6 hours ago | 0

| accepted

Answered
Purchase of toolbox without credit card?
Businesses and educational institutions can (normally) use Purchase Orders. Individuals, businesses, and educational institutio...

6 hours ago | 0

Answered
Convert .mat file into .xls file
Your .mat file has two variables that are completely different. Although it is possible in theory to put both variables into the...

7 hours ago | 0

Answered
How to use ezplot
https://www.mathworks.com/help/matlab/ref/fimplicit.html is recommended these days. ezplot(@(x,y)x.^2 - 9*y.^2 - 81)

12 hours ago | 0

Answered
I tried to import an image in MATLAB that was on my desktop but it returned an error. Please help me out for this
Your current directory is probably not the desktop. The desktop is not on the default matlab path. ls *.jpg

12 hours ago | 0

Answered
Rounded random numbers with fixed sum
https://www.mathworks.com/matlabcentral/answers/327656-conditional-random-number-generation#answer_257296 Multiply your desire...

12 hours ago | 0

Answered
Reading a hex table with some undefined values
filename = 'hex.txt'; missingindication = {'0xXXXXX'}; data = readtable(filename, 'treatasmissing', missingindication, 'read...

14 hours ago | 0

Answered
MATLAB App designer 2019 a
readtable() and set the table itself as the Data property of a uitable() . Use a CellSelectionCallback https://www.mathworks.co...

14 hours ago | 0

Answered
How to convert tif stack to dcm series?
fname = 'Sample19.tif'; info = imfinfo(fname); imageStack = []; numberOfImages = length(info); for k = 1:numberOfImages ...

16 hours ago | 0

Answered
ttest error - undefined variable - error nanmean nanvar etc.
Error in nanvar (line 29) coder.internal.assert(eml_is_const(dim), ... In R2016b, the release you are using, nanvar has 30...

16 hours ago | 0

Answered
Undefined function 'sqrt' for input arguments of type 'char'.
cwt(bigcircle_ant2_data,'amor',1); %produce plot-morlet You are using the calling syntax for newer versions of cwt...

17 hours ago | 0

Answered
C = union( A,B ) is too slow. Is there any faster way given that A and B are ordered.
The faster way would involve writing some mex code. There is an undocumented internal binary search routine, but calling it repe...

18 hours ago | 0

Answered
What type of error is this?
You accidentally save()'d variables on top of a code file. The code is gone. But you might be able to get something useful fr...

18 hours ago | 0

| accepted

Answered
Function implementation matlab language
https://www.mathworks.com/matlabcentral/answers/576745-shifting-handling-in-matlab-with-for-loop#answer_476968

19 hours ago | 0

Answered
Can I run eigs on a GPU?
eigs really is not supported. https://www.mathworks.com/matlabcentral/answers/572377-accelerate-eigs-with-gpu#answer_472900

19 hours ago | 1

Answered
C code generation symbols not found linker error
https://www.mathworks.com/help/images/ref/imadjust.html#bvm6s9t-1 imadjust generates code that depends upon a shared library t...

1 day ago | 0

Answered
calculating error while averaging multiple images
Do you want the average of the R, G, and B separately for each image? Are you asking for averages to be taken over time for ea...

1 day ago | 0

Answered
Is there a way to get the max memory used when I run my script?
https://www.mathworks.com/matlabcentral/answers/214247-allocated-freed-self-memory-and-peak-memory-in-profiler

1 day ago | 0

Answered
how to use datetime(datestr)
Do not try to mix serial data numbers and datetime objects. You can skip most of your problems. t = readtable('data.xlsx'); T...

1 day ago | 0

Answered
ode45 does not solve my second order problem
This has exactly the same problem as before. Your left hand side involves z as a function of x, but your right hand side invol...

1 day ago | 1

Answered
Line Breaks in command window
disp("SPACING"+newline+newline+"CODE") fprintf("SPACING\n\nCODE\n") disp("SPACING");fprintf('\n'); disp("CODE") disp("S...

1 day ago | 0

| accepted

Answered
Error read data from HYCOM
Your url has an extra space at the beginning and the end. I deleted them and tried and had no problem.

1 day ago | 0

Answered
How to select a sub square matrix, from a matrix; given the size of the sub square matrix and middle element
use find() with two output arguments to get the row and column of the center. Then use indexing like row-something:row+something...

1 day ago | 0

| accepted

Answered
How to calculate flotating point
Supposing that the data is stored in F, then char(compose("%.2f %+.2f", round(real(F),2), round(imag(F),2))) This will produce...

1 day ago | 0

Answered
How to make a a certain range with different color in colorbar
https://www.mathworks.com/matlabcentral/fileexchange/69470-custom-colormap The above function requires that the positions be d...

1 day ago | 0

Answered
'Error - Array indices must be positive integers or logical values
t1 = 0; t2 = 0.04; So t2-t1 is 0.04 - 0 = 0.04 x_2 = v_x1(t2-t1)+x_1 That code attempts to index v_x1 at location t2-t1 whic...

1 day ago | 0

| accepted

Answered
How to load library without using mingw64 complier?
See https://www.mathworks.com/matlabcentral/answers/100470-how-do-i-use-loadlibrary-in-a-deployed-program-generated-from-matlab-...

1 day ago | 0

| accepted

Load more