Community Profile

photo

Walter Roberson


Last seen: Today
50 044 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
Error: "Not enough input arguments"
You cannot run the objective function directly: you need to run a function such as the supplied Opt* function which sets up the ...

18 minutes ago | 0

Answered
why doesn't this matlab code work? HELP!!!
You did not initialize i so it will have its default value of sqrt(-1). Then inside the loop when you assign to Tf(i+1) that is ...

environ une heure ago | 0

Answered
Using If for syms
subs(piecewise(x<3,0),x,5) ans = NaN That is, if no condition is matched by the piecewise then the output is undefined, ...

environ une heure ago | 0

Answered
Moving a perpetual license after maintenance expires
Yes, Yes, and Yes.

environ 9 heures ago | 1

| accepted

Answered
Array in a symsum
You are attempting to index x with a symbolic variable. That is not possible with MATLAB, and that is something that is not expe...

environ 19 heures ago | 0

Answered
How to fix error message "Invalid pfile. The file header is corrupt."
You cannot fix it yourself. You need to get the site to recreate the file. However, it is possible that the p file was create...

environ 22 heures ago | 0

Answered
I am trying to test a part of my code but it shows me this message ! how can i solve it , Help plz !
for k=1:1:lenght(Material) You have not defined any variable named Material but you have defined a variable named material...

environ 23 heures ago | 0

Answered
roots of non linear periodic function
format long g rng(655321) L = randn() P = rand() * 10 C = @(x) x.*L.*tan(x*L)-P root1 = fzero(C, pi/3) N = 10; nroots...

environ 23 heures ago | 0

Answered
evaluation of anonymous function
In that code, V is never evaluated. In that code, MATLAB sees the @(x) (0.5+0.5.*sign(r.^2-x.^2))*V0 part and constructs an ...

environ 23 heures ago | 2

| accepted

Answered
Help with Surrogate Modeling Multivariable Objective Function
Yes, you should be able to do that. Construct lb and ub vectors (mandatory!! and must be finite!) that are length() equal to the...

1 jour ago | 0

| accepted

Answered
Reduce symbolic fraction by powers of ten
load sample; syms s G = YQ_sym(1,2); vpa(G,5) vpa(simplify(G),5) [N,D] = numden(G); Dc = coeffs(D,s); FN = factor(N);...

1 jour ago | 1

| accepted

Answered
how to get average of multiple rows and subtract from one group of average to another
M = your matrix with 10039 rows and 64 columns N = 30; whole_blocks = floor(size(M,1)/N); leftover = size(M,1) - whole_blocks...

1 jour ago | 0

| accepted

Answered
Normalization of symbolic expression
syms L R K b J s v a1 = det ([(L*s+R) (v); (-K) (0)]); a = det ([(L*s+R) (K); (-K) (J*s+b)]); g=collect((a1/a)*(1/v),s); G=s...

1 jour ago | 0

| accepted

Answered
How can I add multiple 1 x 1 strings to all rows in a table?
https://www.mathworks.com/help/matlab/ref/table.addvars.html You can use 'Before' and 'after' to add the variables into a part...

1 jour ago | 0

Answered
Merge two figures into one
TextFontSize=20; LegendFontSize = 18; set(0,'DefaultAxesFontName','Times',... 'DefaultLineLineWidth',1,... 'DefaultL...

1 jour ago | 0

| accepted

Answered
Putting two FAS figures into one.
Remove the call figure; Add the call hold on after the plotting

1 jour ago | 0

Answered
Automatically load a csv file from a folder
EEGDIR = '/Users/roberson/Plan9/Dhort/ECGData'; tries = 42; found = true; for trynum = 1 : tries random_MaleShortName = ...

1 jour ago | 0

Answered
Displaying a value using fprintf with certain number of decimals.
format long g a = rand*10 fprintf('The answer for a is %.2f m/s\n', a)

1 jour ago | 1

| accepted

Answered
solution of ordinary differential equations when there is a f(t)
I don't know what's C8 and should I just take the (-exp(2*C8 + 2*t)/(exp(2*C8 + 2*t) - 1))^(1/2) as the correct solution? Yes? ...

1 jour ago | 0

| accepted

Answered
Acquire data from smartwatch sensors via USB
That is going to depend in part on the smartwatch. I just tried with an Apple Series 3 smartwatch. The charging cable is a USB-...

1 jour ago | 1

Answered
Problem with code originally written for MATLAB R2006a -- problems with break statement
Long ago, no error message was generated for a break outside of any loop. I never used that behavior myself... I think I encount...

1 jour ago | 0

| accepted

Answered
Rotating a meshgrid in 3D
The 3d process is much the same, except that you build xyz columns and multiply by a 3x3 array. It can be easier to use makeg...

1 jour ago | 0

| accepted

Answered
MEXFILE error, libmex.dylib not loaded
You might need to do DYENV = 'DYLD_LIBRARY_PATH'; olddy = getenv(DYENV); path_to_add = fullfile(matlabroot, 'bin', 'maci64');...

1 jour ago | 0

Answered
hour of datenum type
datetime("now") Okay, creates a datetime object and lets it be displayed month(datetime("now")) Okay, creates a datetime obje...

1 jour ago | 0

| accepted

Answered
How to replace x or y axis tick values with texts
x=[1,3,4,6]; y=[20,40,50,80]; plot(x,y); yticks([20,40,60,80]) yticklabels({'white', '\color{red}red', '\color{green}green', '...

1 jour ago | 0

| accepted

Answered
Solve the following simultaneous set of nonlinear trigonometric equations:
c1 = 0, c2 = 0, c4 = 0, c5 = -1000, c6 = 0, d3 = -500, s1 = 1/1000, s2 = -1, s4 = -1/s6, s5 = 0, s6 = s6 c1 = 0, c2 = 0, c4 =...

1 jour ago | 1

| accepted

Answered
Can you run third party applications multiple times with MATLAB for analysis?
Sometimes it is possible. It depends on the application, on whether it accepts command line arguments; and if you are using MS W...

1 jour ago | 0

| accepted

Answered
Cannot convert double value 0.01 to a handle.Cannot convert double value 5 to a handle.
format long g fig = figure(1); fig class(fig) %notice it is a handle fig.Number %that has an associated integer H1 ...

1 jour ago | 0

Answered
Unable to perform assignment because the left and right sides have a different number of elements
if 0 <= t(i) && t(i) <= 8 V(i) = 10*t(i).^2-5*t(i); Also else t(i) > 26; That calculates whether t(i) is g...

2 jours ago | 1

| accepted

Load more