Community Profile

photo

Walter Roberson


Last seen: 1 day ago 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
How do you define a structure array?
Possibly procPar already exists but is not a struct or table already. Possibly Dsifile exists but is not a struct or table.

11 hours ago | 0

Answered
Looping through 4 Images that have fixed names
IMList = {app.IM1, app.IM2, app.IM3, app.IM4}; nimg = length(IMList); for K = 1 : nimg IM = IMList{K}; app.ROI_C = ...

11 hours ago | 0

Answered
Result for solve( ) with minimized number of parameters
No. You asked to solve in terms of u and x2, so the results always have to have u and x2 expressed in terms of constants or inde...

13 hours ago | 0

Answered
I get wrong value
omega_p-(Nr/Np)*omega_r== omega_c *( 1- (Nr/Np)); omega_s-omega_c * ( 1+ (Np/Ns))==-(Np/Ns)*omega_p ; Those statements con...

15 hours ago | 0

Answered
Issue accessing external functions with matlab on linux
Look at all those mex files. They are compiled implementation for windows 32, windows 64, and mac, but none for Linux. A lot of ...

15 hours ago | 1

| accepted

Answered
Is this combination of parfor and global variables prone to errors?
That should work, as long as the principal function sets the global variables on every call, or at least tests whether they alre...

21 hours ago | 1

| accepted

Answered
The beginning of my graph is getting the wrong values. values for x=20,25 and 30 are correct. can someone help?
x=0:5:30; y = (110) .* x ./ (5+x) .* exp((-0.8*x)/8); plot(x,y)

1 day ago | 0

Answered
use cell items in the conv
conv() will never be able to process cell arrays . You need to use ab = conv(a{u,1}, b{v,})

1 day ago | 0

Answered
How would I put this into a graph?
syms x y = randi(256) ./ (x ./ randi(10) + x) .* exp(-rand() .* x ./ randi(10)) fplot(y)

1 day ago | 0

Answered
Array indices must be positive integers or logical values.
t = linspace(0,2,1000); t is a (real) vector of length 1000 if t(1i) <= 1 That asks to index the vector t at location 1i...

1 day ago | 1

Answered
How to find the common dates between two different variables that are not the same size or format?
dtdt = datetime(dt, 'ConvertFrom', 'datenum', 'Format', 'dd-MMM-yyyy HH'); dtday = dateshift(dtdt, 'start', 'day'); %change...

1 day ago | 0

Answered
How to insert variables (string) in MATLAB function
rotmatx('y', 'p') rotmatx('z', pi/6) function R=rotmatx(axis,q) Q = sym(q); if axis=='x' R=[1 0 0;0 c...

1 day ago | 1

| accepted

Answered
for文とif 文
rng(1,'philox') X = randi([0 1], 3, 3, 100); a = tril(ones(3), -1) == 1; a = repmat(a, 1, 1, 100); X(a) = 0; X = X + permut...

2 days ago | 0

| accepted

Answered
How to avoid duplication of random numbers?
node_sequence = randperm(n, t-reply_timer); Now use the elements of node_sequence, in that order. You will quickly get an erro...

2 days ago | 0

Answered
Vpa Solve solving for B
M1 = 3; P1 = 1; theta2 = 15; thetha3 = 20; gamma = 1.4; syms beta tantheta = tand(theta2); x = 2*cotd(beta)*((M1^2*...

2 days ago | 0

| accepted

Answered
Can I use the MEX function and compiler with a student license?
mex() is part of basic MATLAB. It relies upon third-party compilers to generate binary code from C or C++ (or fortran) code that...

2 days ago | 0

Answered
Extract first non-NaN of each row without loop
A=[NaN,444,NaN,NaN,41; NaN,NaN,NaN,222,NaN; NaN,NaN,554,554,NaN; 125,747,21,NaN,4; NaN,NaN,NaN,43,NaN; ...

2 days ago | 0

| accepted

Answered
Plot not updating even after changing plot data
You are not plotting into the axes you think you are plotting into. https://www.mathworks.com/matlabcentral/answers/22208-show-...

2 days ago | 0

Answered
having trouble writing a code that produce this graph.
Hint: plot([-3 0 0], [0 0 -4]); xlim([-5 5]); ylim([-5 5])

2 days ago | 0

Answered
Displaying values of x, ode45 and real y in a fprintf command
Yes and no. Yes, you can include an fprintf() statement inside your ode function, and that fprintf() statement will display wha...

3 days ago | 0

| accepted

Answered
Find Command not working.
T = [NaN 0.1:0.1:0.9] a = 0.3; Visually, it looks like 0.3 is in T find(T == a) But find() says it is not there. Is it the...

3 days ago | 0

Answered
Sum of previous 5 numbers
A=[2 3 4 5 6 7 8 9 10 8 5]; B=[0 2 5 9 14 20 25 30 35 40 42 ]; N = 5; C = movsum([0 A(1:end-1)], [(N-1) 0]) isequal(C, B)

3 days ago | 0

| accepted

Answered
lla2ecef is not supported for code generation
https://www.mathworks.com/matlabcentral/mlc-downloads/downloads/submissions/7942/versions/1/previews/lla2ecef.m/index.html

3 days ago | 0

| accepted

Answered
how to make Cubesat fixed
You need a geosynchronous orbit, which is about 42164 km from the centre of the Earth. (Careful, orbits are also often specified...

3 days ago | 0

Answered
How can we know whether the current execution of command is conducting inside a function or not?
The functions nargin and nargout will error if executed at the base. So you can use try/catch inbase = false; try; nargin; cat...

4 days ago | 0

| accepted

Answered
My codes won't show in the plots.
for i =0:n; vo1 = readVoltage(A,'A0'); vo2 = readVoltage(A,'A1'); vo3 = readVoltage(A,'A2'); end Every time thr...

4 days ago | 0

| accepted

Answered
If I upload a MATLAB video to YouTube, I wonder if there are any legal issues.
Academic licenses may be used for the education purposes and internal purposes of the university, including non-commercial resea...

4 days ago | 0

Answered
Avoid overlapping of node labels in graph
Not using the plot() call. Changing the layout might help https://www.mathworks.com/help/matlab/ref/matlab.graphics.chart.primi...

4 days ago | 0

Answered
Genetic Algorithm Plotter does not display
opts=optimoptions('ga', 'FunctionTolerance', 1E-9, 'MaxGenerations', 5000000, 'MaxStallGenerations', 500000, 'HybridFcn', 'patte...

4 days ago | 0

Answered
Defining a function for a vector of values, while keeping two variables unknown
So I must achieve the function, EV(x,i), and then replace by the values of x and i If you must achieve the function first, and ...

4 days ago | 0

| accepted

Load more