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 2022
  • Most Accepted 2021
  • Solver
  • First Review
  • Roberson Cup
  • Most Accepted 2019
  • Most Accepted 2018
  • Most Accepted 2017
  • 36 Month Streak
  • Most Accepted 2016
  • Most Accepted 2015
  • Most Accepted 2011

View badges

Content Feed

View by

Answered
pause function doesn't work R20a
Is that definitely the code? pause() without any parameter waits for a key to be pressed on the keyboard Exception: if pause ...

2 hours ago | 0

Answered
the best way to save .txt
You could consider using readcell and writecell ... but sometimes the easiest way is just to fopen / fprintf / fclose

2 hours ago | 0

Answered
Code generation failed due to unexpected object of type 'RootOf'.
D2ynum = solve(ode==0, D2y, 'maxdegree', 3);

19 hours ago | 0

| accepted

Answered
How do I display .mat file as an image in Matlab
example_matrix = im2uint8(1); should be (I) instead of (1)

19 hours ago | 0

Answered
Can I use parfeval in App Designer to plot to a UIAxes while the code keeps running?
Regardless of whether you use a parallel pool or the newer background pool, no parallel worker of any kind can directly affect t...

2 days ago | 1

Answered
how know size of field struct
What you failed to indicate is that Sis is a non-scalar struct. Sis.D is then "struct expansion". So size(Sis.D) is the same ...

3 days ago | 1

| accepted

Answered
include all rows matrix in []
zc = num2cell(z,1); %1 --> preserve first dimension [Sis.h] = zc{:}; %or [Sis.h] = deal(zc{:});

3 days ago | 1

| accepted

Answered
How can I iterate through all .txt files in a folder to process them with already written code?
projectdir = 'location/of/text/files'; dinfo = dir(fullfile(projectdir, '*.txt')); filenames = fullfile({dinfo.folder}, {din...

3 days ago | 0

| accepted

Answered
How we can use fminsearch with a vector as input and return a scaler as an output?
y is 1000 x 1. You are passing scalar 0 as the initial value for fminsearch() so at each step h will be 0 inside your gradient ...

3 days ago | 0

| accepted

Answered
How can I find the elapsed time between two images from video file with matlab.
Unfortunately, none of the common video formats record absolute time for frames. If you are using videoreader() then you can u...

4 days ago | 0

Answered
textscan does not scan the text as accurate as strread, i have "errors"
a = "C +01.314 +027.11 +01.225 +01.578 +01.579 Air" Result = textscan(a,'%s%f%f%f%f%f%s','Delimiter',' ', 'multi', true) ce...

4 days ago | 1

Answered
how do I turn a piece of code into a parametric optimisation
% % Matrix properties (8552 example) Em = 380E3; % Young's modulus num = 0.22; % Poisson's ratio Vv_vals = [0.01, 0.38, 0.47...

4 days ago | 0

| accepted

Answered
Problems using Plot function
You are plotting one point at a time. By default, plot() does not put in any markers, and plot() can only draw lines when there ...

4 days ago | 0

| accepted

Answered
A unknown bug on matrix
Consider: A = [3 2 1 0 -1 -2 -3] Are you expecting the result to be [3, 2, 1, (0-1-2-3)] --> [3, 2, 1, -6] a vector of 4 eleme...

4 days ago | 0

| accepted

Answered
How to solve this equation?
There are multiple solutions. p=0 is a solution for all a values, but there are also complex solutions -- and you did not rule o...

4 days ago | 0

| accepted

Answered
how to reduce time for this Convolutional Neural Network to get result?
See https://www.mathworks.com/help/stats/fitcecoc.html#d124e356431 for information on 'options' 'useparallel' for computation in...

4 days ago | 0

Answered
i need wave_gen function but i can't find it!!!
See https://www.mathworks.com/matlabcentral/answers/26814-use-of-wave_gen-function#answer_34917

5 days ago | 0

Answered
serialport / bluetooth issues
What that second post is telling you is that serialport() has an internal onCleanup that is invoked when serialport() detects th...

5 days ago | 0

Answered
looking for convenient way to extract matrix from 1*n*n
A = zeros(5,5,5) B = permute(sum(A,1), [2 3 1]); size(B) squeeze() is a convenience function that ends up invoking permute()....

5 days ago | 0

Answered
tiledlayout() "exceeds array bounds" when repeated running the script, but works when workspace cleared
tiledlayout.Padding = 'compact'; That creates a struct named tiledlayout <https://www.mathworks.com/help/matlab/ref/matl...

5 days ago | 0

Answered
trying to create a plot of cost per mile when the trailer weight increases in a program I wrote and i cannot get it to work.
You were doing well, but starting from 'diesel' when C==6 then you have elseif TW>2000 && TW<=4000 and...

5 days ago | 0

Answered
Simplifying equations with trigonometric terms written in terms of degrees and not radians
C2D = @(C) cosd(rad2deg(children(C, 1))) mapSymType(Expression, 'cos', C2D)

5 days ago | 1

Answered
Error using ' TRANSPOSE does not support N-D arrays. Use PAGETRANSPOSE/PAGECTRANSPOSE to transpose pages or PERMUTE to reorder dimensions of N-D arrays.
Your nc file has lat, long, one depth, and multiple times, making it a 4 dimensional array. You are trying to pcolor() the entir...

5 days ago | 1

| accepted

Answered
Unable to use ODE45 to model data, error with "Unable to meet integration tolerances without reducing the step size below the smallest value allowed (4.708773e-14) at time t."
c0=[0.0188,0]; A=beta(3)*c(1)^beta(1); B=beta(4)*c(2)^beta(2); I would think it is highly likely that that ode23t i...

5 days ago | 0

Answered
Help for matrix in matlab
prod(M, 2) sum(M, 2) min(M, 2) max(M, 2) any(M, 2) all(M, 2) std(M, [], 2) amongst others

6 days ago | 0

Answered
How to solve "Inf" from table calculation in GUI
your xtes and ytes are exactly the same so subtraction gives 0.

6 days ago | 2

Answered
uifigure alternatives for gcf, gcbf, gco, gcbo, gca, and any other legacy figure based functions
I used to think that those functions simplify didn't apply to uifigure and children. However someone indicated that the real iss...

6 days ago | 0

Answered
can you specify a newly created sheet to be at the start of a spreadsheet using writetable?
no, writetable cannot manipulate the tab order. If you happen to be using Windows see https://www.mathworks.com/matlabcentral...

6 days ago | 1

| accepted

Answered
helps to solve objective function with restriction, to obtain the value of the constant C
The integral of the density function must be exactly 1. The c is a constant multiplier. So if you calculate the integral without...

7 days ago | 1

Answered
All functions in a script must be closed with an 'end'.
Delete or comment out everything from the "function" line. * Your script never invokes the function * functions inside a scr...

7 days ago | 2

Load more