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 T0099000; if you are waiting on a reply from me for an older issue, please send me a reminder.

Programming Languages:
C++, C, MATLAB, Shell, Perl, Fortran
Spoken Languages:
English

Statistics

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

View badges

Content Feed

View by

Answered
Computation of sum/product of triple integral using function handle
h = @(x1,x2,x3) x1.*(t - x2).^x3; g = @(x1,x2,x3) exp(-0.5.*((y - h(x1,x2,x3))./sigma).^2 ); f = @(x1...

4 hours ago | 0

Answered
reading edf/edf+ file
You could try https://www.mathworks.com/matlabcentral/fileexchange/38641-reading-and-saving-of-data-in-the-edf It would be int...

7 hours ago | 0

Answered
bifurcation for Van der Pol osscillator
I am not sure what you are expecting ? %%Initialize the environment %%Model parameters r = 0.806; a = 15; b = 16; c = 17...

8 hours ago | 0

Answered
Error using odearguments (line 113) Inputs must be floats, namely single or double.
syms omega omega is symbolic. eps = @(r) eps_inf - (omegap_r(r).^2./(omega.^2+(1i*omega.*gamma))); eps computes using ome...

8 hours ago | 0

Answered
pixelLabelDatastore only supports pixel label image files with uint8 data
imageDir = fullfile(fpath,'A'); labelDir = fullfile(fpath,'A'); Your imageDir and labelDir are the same. imds = imageDatastor...

9 hours ago | 0

Answered
Third Order ODE with unit step input
sympref('HeavisideAtOrigin', 0); syms y(t) assume(t > 0) Dy = diff(y,t); D2y = diff(y,t,2); u(t) = heaviside(t); %// I saw ...

12 hours ago | 0

| accepted

Answered
I'm trying to track a particle's velocity at each time step, but my X&Y Velocity Variables keep becoming matrices, instead of overwriting each time. How should I fix this?
TrackedVelocity(Counter) = sqrt((VelocityX)^2 + (VelocityY)^2); So TrackedVelocity is a vector that is increasing in size. if ...

12 hours ago | 0

Answered
How to fix this problem Genetic Algorithm
initpop = randi([0,1]); So initpop is a single random scalar value, either 0.0 or 1.0 ? pop= initpop(popsize,n) %初始种群initpop.m...

12 hours ago | 0

Answered
How to convert from gray scale to RGB
[I,cmap] = imread('noise1.tif'); Nearly all of the time, tif images are read in as integer data types. They might be uint8 or i...

12 hours ago | 0

Answered
what's wrong in my code?
You created y as a symbolic function, syms y(t) You try to assign to ySol(y) . But y is a function, and you cannot index by a f...

12 hours ago | 0

Answered
How do you link a function
function [x,y]=get_number(N) get_number returns two 1 x floor(N(1)) outputs (unless N(1) < 1, in which case it returns two 1 x ...

12 hours ago | 0

Answered
File returns a vector of length 29, but the length of initial conditions vector is 8.
Y0 = [0.0001,0.0001,0.0001,0.0001,0.0001,0.0001,4.75,0.7]; 8 boundary conditions. function res = respiratory_model(CI_CO2,...

13 hours ago | 1

| accepted

Answered
Why do I get Array indices must be positive integers or logical values?
n=0:1/fs:1; % Time range x(n)=2*sin(2*pi*(n/fs)); % Signal in time spectrum You have confused two different concepts. In math...

23 hours ago | 0

| accepted

Answered
Given a set of date point x and y, estimate three polynomial functions (2nd degree, 3rd degree, 4th degree) that will best fit the data.
The question is expecting you to also polyfit with degree 2 and 4, and to polyval with those, and to compute the norm() of the p...

23 hours ago | 0

Answered
Nonlinear simultaneous equation solution with a syms function.
F1_F2=@(x_1, x_2)[f1(x_1,x_2);f2(x_1,x_2)]; %%%%%%%%%%%%%%%Change F1_F2=@(x_s)[f1;f2]; Or you could have computed: F1_F2 = ...

23 hours ago | 0

| accepted

Answered
Find the Polynomial form of the denominator
r = [4 0 -2 0 3] poly2sym(r)

24 hours ago | 0

| accepted

Answered
how to compute premitive function
It is working as well as you can expect. Remember, the derivative of f(x)+constant is d f(x)/dx + d constant/dx and d constant/...

24 hours ago | 0

Answered
Extract Tables from within a cell
Tables{1} Tables{2} and so on. If you wanted to put the results together into a cell array so that you could work with this i...

1 day ago | 0

Answered
How can I find the index of a specific element in an array
R = 5000; T = [0 8 39.3 103 236.5 511.7 1026.1 1906.9 3148.7 4293 4011.9 2628.4 1037.4 203.7 28.6 9.4 4.2 1.4 1.3 ...

1 day ago | 1

| accepted

Answered
Is there any way to fix frequency using the fit() function and “sin”?
No. You should create a custom model for that. Are you sure that you want the frequency to be 2 for 48 hours data? As in sin(2*...

1 day ago | 0

Answered
Index exceeds the number of array elements. Index must not exceed 1.
digestive_model() function res = digestive_model() syms x(y) c = 7; tau = 1; K = 1; c0 = 1; c1 = 1; a = 1; b = 1; v0 = 0....

1 day ago | 1

| accepted

Answered
how to find index of 50% of sum of signal?
Hint: 4, 2, 3, 1, 5, 6, 11 4, 4+2, 4+2+3, 4+2+3+1, 4+2+3+1+5, 4+2+3+1+5+6, 4+2+3+1+5+6+11 --> 4, 6, 9, 10, 15, 21, 32 4<=3...

1 day ago | 0

Answered
Error while building a c++ library interface
-l-LC:\Program Files\MATLAB\R2021b\extern\lib\win64\mingw64 That is missing a space and also some other information. There ar...

1 day ago | 0

Answered
Call a certain function at the last iteration if flag is set to true
plot_final_iteration_only = true; for iter = 1 : max_iter % Do stuff... if ~plot_final_iteration_only || iter == max_...

1 day ago | 0

| accepted

Answered
Particle has an applied constant force until it aproaches C
Suppose that you have a high M (relativistic mass). a=F/M so a is "low". v=a*Ts so with low a, v would be low. But low v leads t...

2 days ago | 0

Answered
How can I create a vector of numbered names
v = "λ" + (1:n)

2 days ago | 0

| accepted

Answered
Warning in Mobile Robotics
You attempted to load into a MATLAB session that does not have the class definitions for a robotics occupancy grid. Possibly you...

2 days ago | 0

| accepted

Answered
error in indexing mode
You accidentally created a variable named "size"

2 days ago | 1

Answered
Nonlinear equations using fsolve leads into exceeding the iteration limit and solver stops prematurely.
There is no solution. F(5) involves only x(4) times something, and that has to equal 0. But for finite x(4) the only solution...

2 days ago | 1

Answered
How I can read image with PPM format without imread and design PPM reader ?
fopen the file and read it as a series of uint8. fclose(). Now use loadlibrary() to make a call to the libnetpbm library to deco...

3 days ago | 1

Load more