Community Profile

photo

Walter Roberson


Last seen: Today
51.299 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

  • Roberson Cup
  • Most Accepted 2019
  • Most Accepted 2018
  • Solver
  • First Review
  • 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

View all

Contributions in
View by

Answered
How should I store data from my parfor loop as to reduce runtime?
Appending data to a table like that is expensive. If your data is all the same datatype, store your data in arrays, and then co...

etwa 3 Stunden ago | 0

Answered
Octree implementation for point cloud data
https://www.mathworks.com/help/stats/kdtreesearcher.html kdtree for data dimensions up to 10 default to building trees, so pas...

etwa 3 Stunden ago | 0

Answered
How to convert arc circle plot into binary circle?
https://matlab.fandom.com/wiki/FAQ#How_do_I_create_an_arc.3F shows how to create an arc. But for your purpose, instead of using...

etwa 3 Stunden ago | 0

Answered
Maximum recursion limit of 500 reached.
You have accidentally named one of your own functions the same as a function used by MATLAB graphics, and every time MATLAB goes...

etwa 4 Stunden ago | 0

Answered
integral of a matrix
format long g M = ones(3,3); Dmat = [1;2;3]; fun = @(t)expm(-M.*t)*Dmat; T = 1e-2; g = integral(fun,0,T,'ArrayValued',true)...

etwa 4 Stunden ago | 0

| accepted

Answered
Matlab CSV data and if statement
Use discretize() to classify the data according to ranges of values. Then you can use the returned range number to index a list ...

etwa 4 Stunden ago | 1

| accepted

Answered
Error using plot Invalid first data argument.
MATLAB has a feature known as "command / function duality". Any time you see a line of the form WORD1 WORD2 .... WORDN and t...

etwa 4 Stunden ago | 0

Answered
Problems in Parfor Implemenation
Change v_poli(s,:) = interp1(b, v, b_grid, 'linear', 'extrap'); % true v_t+1 v_poli(v_poli>0)=-1e-6; to...

etwa 4 Stunden ago | 0

Answered
Overview variables at the beginning
https://www.mathworks.com/help/matlab/matlab_prog/format-live-scripts.html shows you how you can use the LiveScript editor to in...

etwa 4 Stunden ago | 0

| accepted

Answered
Error using fmincon, the function cannot continue
aymax = 5; V = 70; deltay = 60; deltax = 3; intorno = sqrt(deltax^2+deltay^2); dmin = 3; rof1 = optimvar('rof1'); rof2...

etwa 5 Stunden ago | 0

Answered
error of vector must be same length
PIP, PEEP, opmin ,opmax are all constants, so recruitment() invoked on those is always going to return the same thing. p = y(:,...

etwa 6 Stunden ago | 0

Answered
How can calculate the matrix inverse
C=D*R*D' implies that C * inv(D') = D * R inv(D) * C * inv(D') = R so R = D\C/D';

etwa 6 Stunden ago | 0

| accepted

Answered
automated variable highlighting/ code highlighting doesn't work anymore
I have a vague memory that the Code Analyzer (used to be called mlint https://www.mathworks.com/help/matlab/ref/mlint.html ) has...

etwa 9 Stunden ago | 0

Answered
'solve' not working as expected for Log Equations
if you vpasolve() and use a low enough start then it will find a solution ss=vpasolve([f1,f2],[n,k], [.8999999040792;1]) The s...

etwa 11 Stunden ago | 1

| accepted

Answered
How to sum over indices i+j=k without using a for loop?
If you have i+j = k, then you start at row k-1, column 1 as the first point (if k >= the number of rows). The next point would b...

ein Tag ago | 0

Answered
compress audio signal recorded in GUI
%one way of compressing compressed_mr1 = mr(1:2:end,:); %another way of compressing compressed_mr2 = resample(mr(:,1), 8000...

ein Tag ago | 0

Answered
Hi; i need help please. I want to multiply the 5 slices i chose from image vol (1) * slices from image vol (3) and (img2 * img4) this program displays as (img2 * img4) , I wan
You have for p=1:2:3 jpgfiles=dir(fullfile(a,'\*.nii*')); n=numel(jpgfiles(p)); im=jpgfiles(p).name img...

ein Tag ago | 0

Answered
How do I change the Input data of the Constant Block When the sampling time comes?
You would have to use sim() after having set a termination time on the model. Then you would set_param() to set the conditions o...

ein Tag ago | 0

| accepted

Answered
How to determine number of rows in an excel sheet without uploading it into matlab
filename = 'YourFile.csv'; lines_in_file = -inf; if isunix() %mac or linux cmd = sprintf('wc -l "%s"', filename); ...

ein Tag ago | 0

Answered
Upload files to Matlab cluster
Im using matlab cluster (AWS based) What operating system is the AWS running? My understanding is that AWS clusters are mostly ...

2 Tage ago | 0

Answered
Undefined variable in a self-written function
integrand = @(d) langevin(d).*distribution(d).*(pi/6)*d.^3; para = A*integral(integrand,0,200e-9)+C.*x;

2 Tage ago | 0

Answered
Error in converting binary to audio after recording the audio and converting it into binary .......KINDLY HELP!!
format long g myRecording = randn(5,1) wavebinary = dec2bin( typecast( single(myRecording(:)), 'uint16'), 16 ) - '0'; size(...

2 Tage ago | 0

| accepted

Answered
How to push a first whites (which is not equal to 0) elements from the mask image into the vector array to make line over stored points.
iminarize(), bwareafilt() After that if your binary image is BW, then first_white_row_idx = sum(cumprod(~BW,1)) + 1 but be c...

2 Tage ago | 1

| accepted

Answered
Generating a normal distrbution random numbers and setting them to catagories
Asum = Asum+a(n) You have a(n)=r(n); Suppose it is true for n = 2 and 5. Then assigning to a(2) would create a(1) ...

3 Tage ago | 0

Answered
Why am I Unable to use Datetime Ticks for UIAxes in MATLAB App Designer?
It is possible to plot datetime in app designer. dt = datetime('now') - days(1:5) r = rand(1,5) fig = uifigure() ax = uiaxes...

3 Tage ago | 0

| accepted

Answered
Error using unzip (line 84)
The file is not zip and is not gzip either. If you happen to be using Mac or Linux, then rename the file to end with .Z and the...

3 Tage ago | 1

| accepted

Answered
What's the alternative of DisplayName in App Designer?
Tested. fig = uifigure(); ax = axes(fig); h = plot(ax, rand(1,5), 'displayname', 'test'); legend(ax, 'show') The key here i...

3 Tage ago | 1

| accepted

Answered
Change color of numbers at colorbar
surf(rand(5)) colormap(turbo) hcb = colorbar; hcb.Ruler.TickLabelFormat = '\\color{red}%g'; The double \\ is important for t...

3 Tage ago | 0

Answered
How can I add path in Matlab to read files csv and excel files from specific folder and read the data?
filename = 'https://www.mathworks.com/matlabcentral/answers/uploaded_files/655500/WT_%20-%2010-15.csv'; t = readtable(filenam...

3 Tage ago | 0

| accepted

Answered
MatLab crashes when I insert a large dataset that I am assigning to a matrix
In the main MATLAB command window, Preferences -> MATLAB -> General -> Java Heap Memory and increase the memory allocation. Yo...

3 Tage ago | 0

Load more