Community Profile

photo

Walter Roberson


Last seen: Today
46.463 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

  • Most Accepted 2019
  • Most Accepted 2018
  • Most Accepted 2017
  • Solver
  • First Review
  • 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
  • Knowledgeable Level 4

View all

Contributions in
View by

Answered
Efficiently ways to solve for multiple for loops, of which the indices are the parameters of a function
You can do at least part of it in vectorized form. The following deliberately creates random numbers in the same order as if yo...

alrededor de 9 horas ago | 0

Answered
How do I define an empty table of unknown size?
Sorry, variables that do not exist do not have any datatype. As you add variables to the table, the datatype associated with t...

alrededor de 10 horas ago | 0

Answered
upper case need help
str=char(mod(double(lower(str))-97+shift,26)+97);

alrededor de 10 horas ago | 0

Answered
Saving and loading matrices with vpa entries with save and load commands is extremely slow
You are correct, this can happen. The slowdown is inside the symbolic engine, when it is asked to convert into a character repre...

alrededor de 12 horas ago | 0

Answered
How to extract the events which have more than 3 consecutive rows
r=3; how many repeats mask = idx3.' == 2; %row starts = strfind([false mask], [0 ones(1,r)]; stops = strfind([mask, ...

alrededor de 13 horas ago | 1

| accepted

Answered
Error detected but matlab did not specify the type of error. pls help out
m25 = Mb.*Nb(1-(0.5.*(c4(i)+c4(i+1))))-((1-(0.5.*(c1(i)+c1(i+1)))).*beta1.*(x2(i)+h2.*m12)+(1-c2(i)+c2(i+1)).*beta2.*(x3(i)+h2...

alrededor de 14 horas ago | 0

Answered
about random number and matrix
R1=a*[0:n-1]; R2=b*[0:n-1]; R2=rand(1, 1, 100000)+R2.'; % add rand to every element in R2 del=R1-R2 ; % "row vector-column ...

alrededor de 14 horas ago | 0

Answered
Question about hard coding error
Suppose that you are required to build a function f(x,y), and you happen know it will be called with y = 19, but you write the c...

alrededor de 14 horas ago | 0

Answered
subset the plot for the subset of x range
See isbetween() or use find(date_vector < last_date_to_plot, 1, 'last') in order to find the end of the group. In the special c...

alrededor de 14 horas ago | 0

Answered
How to read the name of all output argument in function?
In order to do this, you need to use dbstack('-completenames') to find out the name of the file that you were called from and th...

alrededor de 14 horas ago | 0

Answered
function or functions of a single variable
fplot('-exp(-x)+x.^2-2*x+2',[0 1]) As far as fplot() is concerned, e is just another variable, and not the base of the natural ...

alrededor de 15 horas ago | 1

Answered
convert alphabet to coresponding number by using ASCII
UpperToLower = @(c) char(c-'A'+'a') Or if you are daring, UpperToLower = @(c) char(c+32);

alrededor de 15 horas ago | 0

Answered
Use Matlab R2019a to solve integer programing , why I get warning that selection function is ignored?
When you use integer constraints then ga() implements that by using its own creation function and selection function. If you ...

alrededor de 23 horas ago | 0

Answered
How to reduce computation time
By going back and replacing that 1000 limit with infinity, and adding the assumption that all values are non-negative, and that ...

1 día ago | 0

| accepted

Answered
Finding set of variables that make my function approach zero
x(1) = 0.00001 x(3) = x(1) x(2) = 0.00000058171249020241154476633048977861 x(4) = x(2) f will be 0 to within round-off Th...

1 día ago | 0

Answered
Split Data in Character Array into Matrix
temp = regexp( cellstr(sample), '"(?<date>)[^"])"\s+(?<col2>\S+)\s+(?<col3>\S+)\s+(?<col3>\S+)\s+(?<col4>\S+)\s+(?<col5>\S+)\s+(...

1 día ago | 1

Answered
Repetition of random numbers for variables with different length
random number generation is done down columns, so with (2,2) the order would be 1 3 2 4 When you then use (1,2) then the ...

1 día ago | 0

Answered
How can I access the numerical vector in a sym variable equation for future use in my program as a numerical value?
In this situation, rhs(x1) For future use, see also children()

1 día ago | 1

Answered
SURF plot: Data dimensions must agree
dataset=xlsread('import.xlsx'); x = dataset(2:end,1); y = dataset(1,2:end); Z = dataset(2:end,2:end); surf(x, y, Z.', 'edgec...

1 día ago | 0

| accepted

Answered
Im trying to solve an equation that have variable on left and right side
depth= 1385.33 por=0.153 Qv=0.980 B=3200 Rw=0.265 m=1.86 n=2.2 Rt=4.05 F = @(Sw) (Sw) - ((Rw/((por^m)*Rt*(1+(B*Qv*Rw)/Sw...

3 días ago | 0

Answered
Solve/fsolve system of equations with exp, and multiple variables.
Your d_H_tf_C(tf)==0 turns out to be a differential equation involving x(tf) . You can solve the remaining 4 equations to derive...

3 días ago | 0

| accepted

Answered
How to compare data from two different data systems y1,x1 and y2,x2?
You can use pdist2() to find the distance from each x1/y1 point to each x2/y2 point, and then use min() . Or you can use knnsear...

3 días ago | 0

Answered
Finding the value of x in vector equations
(-8*x-4)*i + (y+9)j = 9*y*i -7*x*j i and j are independent so you can separate the variables (-8*...

3 días ago | 0

Answered
Creating a Loop with "SAVEAS" after generating Figures
As you generate each figure, store its handle into a vector of figure handles, such as fighandles(). Then index it in your loop....

3 días ago | 1

Answered
Stop loop when first result is hit / loop of comparison bewteen different tbl heights?
overlaps = ... (drug1_data.StartDay <= drug2_data.StartDay.' & drug2_data.StopDay.' <= drug1_data.StopDay) | ... (drug...

3 días ago | 0

Answered
Converting binary characters into a char - Error!
You have 8 bits per character, not 7 bits per character. 255 characters of 8 bits each = 2040 bits.

3 días ago | 0

Answered
Getting "reached maximum number of intervals in use" error message on simple integration
your function has discontinuities at +/- 1.495, which is within the range of integration. Numeric integration is not able to res...

3 días ago | 0

| accepted

Answered
Warning: Function figure has the same name as a MATLAB builtin.
You named your file figure.m which will cause problems. You should rename the file for your code.

3 días ago | 0

| accepted

Answered
transforming mm():mm() to 'yyyy/mm'
datetime(date,'convertfrom', 'excel', 'format', 'yyyy-MM')

3 días ago | 0

Answered
issue when quantifying logo symmetry
regionprops(double(grayimage>0), 'centroid') and observe that the centroid is 1 pixel to the right of where you would expec...

3 días ago | 0

| accepted

Load more