Community Profile # 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
• • • • • • • • • • • • #### Content Feed

View by

How to add function argument for nthroot() ?
That fix you link to has no relationship to your current difficulty. https://www.mathworks.com/help/matlab/ref/nthroot.html#buc...

6 hours ago | 0

argument should be a vector
I suspect that your x2 is the output of an audioread(), and that your audio file has two channels (stereo). Your code is expecti...

6 hours ago | 0

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...

13 hours ago | 0

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

16 hours ago | 0

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...

17 hours ago | 0

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...

17 hours ago | 0

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...

18 hours ago | 0

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 ...

21 hours ago | 0

| accepted

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 ...

21 hours ago | 0

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...

21 hours ago | 0

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...

21 hours ago | 0

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...

21 hours ago | 1

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 ...

21 hours ago | 0

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,...

22 hours ago | 1

| accepted

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...

1 day ago | 0

| accepted

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...

1 day ago | 0

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 = ...

1 day ago | 0

| accepted

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

1 day ago | 0

| accepted

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/...

1 day ago | 0

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

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

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

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....

2 days ago | 1

| accepted

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...

2 days ago | 0

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...

2 days ago | 0

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_...

2 days ago | 0

| accepted

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

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

3 days ago | 0

| accepted