Community Profile

photo

Walter Roberson


Last seen: Today
46 895 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 I can run my CPU at 100% usage with parfor loop?
To fully use the CPUs with parfor open the parpool explicitly instead of waiting for it to be open automatically write your co...

ungefär 3 timmar ago | 1

Answered
how to assign value to a specific position in cell
if size(B,1) > size(A,1) A(size(B,1),1) = {}; %extend A if needed end if size(B,2) > size(A,2) A(1,size(B,2)) =...

ungefär 4 timmar ago | 1

| accepted

Answered
Matlab Writing out Taylor Series for Cos X
syms t y for n = 0:5 d = diff(cos(t),n); z = vpa(subs(d,t,0)); x(n+1) = z*y^n/factorial(n); end disp(x)...

ungefär 4 timmar ago | 0

Answered
Empty sym: 0-by-1
The equation has no solutions. You can use vpasolve() specifying a large number of digits and you will get some answer, but the...

ungefär 4 timmar ago | 0

Answered
When I import my excel sheet into excel the dimensions change
(when not passed a range to process) xlsread() starts out by reading all of the data in the worksheet into a cell array, call it...

ungefär 4 timmar ago | 1

| accepted

Answered
Accessing the nth dimension in a variable sized multidimensional array
nd = ndims(YourArray); dim_wanted = randi(nd); proto = repmat({1}, 1, nd); proto{dim_wanted} = ':'; just_that_dim = YourAr...

ungefär 7 timmar ago | 0

Answered
Warning: Function behaves unexpectedly on array inputs. To improve performance, properly vectorize your function to return an output with the same size and shape as the input arguments.
syms x y z Jd = (-(((x - 10)^2 + (y - 8)^2 + (z - 1/10)^2)^(1/2)/343 - ((x - 9)^2 + (z - 1/10)^2 + y^2)^(1/2)/343 + 16615346175...

ungefär 7 timmar ago | 1

Answered
Loading the 'C' DLL in matlab.
If this is for calling from within mex then see https://www.mathworks.com/matlabcentral/answers/99915-can-i-call-an-external-sha...

ungefär 7 timmar ago | 0

Answered
adding the vectors at each cell in cell array
cell2mat( arrayfun(@(R) sum(cat(1,M{R,:})), (1:size(M,1)).', 'uniform', 0) )

ungefär 9 timmar ago | 0

Answered
How can I access data from folders?
files = dir('H:\Project Two\Programming and DataSet\*\*.dat'); names = fullfile( {files.folder}, {files.name} ); names will no...

ungefär 13 timmar ago | 0

Answered
operator error for loop
In MATLAB, a for statement must have one of the following syntaxes: for variable = scalar_value : scalar_value for variable = ...

ungefär 13 timmar ago | 0

| accepted

Answered
Matlab Report Generator (Unknown Error to me)
figure; %.... close gcf; Do not do things that way. Instead record the figure() handle, and close() the handle. ...

ungefär 13 timmar ago | 0

| accepted

Answered
Coordinates of the shortest path between two points in a 2D grid
For the case where each location has the same "cost" to move over, and not all locations are passible, then: https://www.mathwo...

ungefär 13 timmar ago | 1

Answered
loop or other better solution for mixing?
nd = 4; %number of databases, adjust as needed vec = 0 : 0.1 : 1; [P{1:nd}] = ndgrid(vec); total = sum(cat...

ungefär 14 timmar ago | 0

Answered
Extract data by skipping few numbers
After you do the reshape forming U1, then just do U = U1(1:iskip:end, 1:iskip:end, 1:iskip:end);

ungefär 17 timmar ago | 0

Answered
Invalid MEX-file '....mexw64': The specified module could not be found..
"Invalid MEX-file '...\MexFileName.mexw64': The specified module could not be found" That typically means that the .mexw64 file...

ungefär 17 timmar ago | 0

Answered
How to do Symbolic Optimization in matlab?
No, there is no function for that. For polynomials, you can proceed by dy = diff(y, x); extrema = solve(dy, x); d2y = diff(d...

ungefär 18 timmar ago | 1

Answered
Is there a way to lock the cursor on the graph?
https://www.mathworks.com/matlabcentral/fileexchange/3265-magnetginput

ungefär 19 timmar ago | 0

Answered
Error: Undefined function 'mtimes' for input arguments of type 'cell' -2
P1{io,jo} = NumericalFourierForce{io,1}{jo,1}(1:L/2+1); The assignment on that line would fail if P1 is an existing variable th...

ungefär 19 timmar ago | 0

| accepted

Answered
How do i get the table to access all my iterative data?
%xi = iterations %ap = approximate value %pe = percet error recorded % pe desired 1*10^-5 x= -0.95; while(1) x...

ungefär 19 timmar ago | 0

Answered
Given that you have the code below, how do you write a code to count the number of points in each quadrant with the attached data set
Supposing your two variables are named v1 and v2, then counts = accumarray([1+(v1(:)>=mean(v1)), 1+(v2(:)>=mean(v2))], 1, [2 2]...

ungefär 21 timmar ago | 0

Answered
How can I convert an image into a patch?
Would a surface be acceptable instead of a patch? If so then see warp() https://www.mathworks.com/help/images/ref/warp.html If...

en dag ago | 0

Answered
Convert it into index type
[image_mat, cmap] = imread('flage.png'); if isempty(cmap) if ndims(image_mat) > 2 ...

en dag ago | 0

| accepted

Answered
Hoe to implement a listener that deletes its calling object?
The right way would probably be not to do that at all. Instead, put in a position constraint that prevents the ROI from moving ...

en dag ago | 0

Answered
Image Grey to Color
B = imcrop(img,[1, 1, w, h_one]); What is the first row number that will be extracted when you do that? What is the last row nu...

en dag ago | 0

Answered
Dimensions of matrices being concatenated are not consistent ?
I notice that you are using R2016a, so I will not mention some of the possibilities for later releases You cannot do that with ...

en dag ago | 0

Answered
what does "parpool close force local" mean?
Something like, if numProc <= 1 p = gcp('nocreate'); if ~isempty(p) delete(p); end poolSize = 0; ...

en dag ago | 0

| accepted

Answered
Endpoints of drawline()
h = drawline(); ep = h.Position; x1 = ep(1,1); y1 = ep(1,2); x2 = ep(2,1); y2 = ep(2,2); https://www.mathworks.com/...

en dag ago | 1

| accepted

Answered
Tools used for Sparse Matrix Efficiency
used_count = ceil(n + X*Y*Z*6); A = spalloc(n, n, used_count); for i = 1 : n; A(i,i) = -6; end for ix = 1:X for iy = 1:Y...

en dag ago | 2

Load more