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

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

Statistics

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

View badges

Content Feed

View by

Answered
How to reshape any matrix using while loop or any other method?
A = B(:, 1:6:end) ;

17 minuti ago | 0

Answered
How to free memory from C-code in simulink embedded matlab code block
StopFcn will not have access to the persistent variables. Use global and a datastore

circa 2 ore ago | 0

Answered
Can Matlab record an audio with a sampling frequency of 800 hz
audiorecorder cannot be used for this purpose. Although the frequency range supported is operating system and hardware specific,...

circa 4 ore ago | 0

Answered
Do you edit code on Github?
The code you upload to Github should be tested code (with the possible exception of Github collaboration mode)

circa 4 ore ago | 0

| accepted

Answered
Minimisation of a scaler function
The function is ST(fSL .* (exp(scale .* SC))) with varying values of "scale". You did not happen to show the definition of ST ...

circa 4 ore ago | 0

Answered
Good day, Please I tried searching for drive cycle on my Simulink but I didn't find it.
https://www.mathworks.com/help/autoblks/ug/install-drive-cycle-data.html You need Powertrain Blockset

circa 9 ore ago | 0

Answered
How to do +,-,*,/ with one scalar and one matrix(IN GUI)?
str2double always returns a scalar when the input is a character vector or character array. It only returns a matrix if the inpu...

circa 9 ore ago | 1

Answered
How to make xtick where there is a tick label in bold?
xticklabels({'','','\bf 1980','','','','','\bf 1985',... '','','','','\bf 1990','','','','','\bf 1995','','','','','\bf 2...

circa 21 ore ago | 0

Answered
Divide an image vertically into two equally luminous parts, ..., calculate the luminance of each part.., PERSONAL NON-FUNDED RESEARCH,
"divide the picture vertically such that the two parts (left and right) have equal luminance" Consider a checkerboard pattern...

circa 21 ore ago | 0

Answered
a single line of code that will take complex variables x and y and define a variable z as the phase of the product of x and y.
https://www.mathworks.com/help/matlab/ref/angle.html but does the angle need to be in degrees or radians? And what range?

circa 21 ore ago | 0

Answered
How to remove scientific notation from axes labels on log-log plot, and add thousands separator?
Although you can set ax.xAxis.TickLabelFormat and ax.XAxis.Exponent none of the automatic formats support thousands separator. Y...

circa 21 ore ago | 0

Answered
nonconformant arguments, Array substitution
You cannot. Breadth is a column vector of length x. [1;4;2;4;2;4;2;4;1] is a column vector of length 9. You cannot multiply thos...

1 giorno ago | 0

Answered
Convert Txt file to an array
data = readmatrix('C:\Users\Acer\Desktop\project hydro\Offset.txt');

1 giorno ago | 0

Answered
datasets related 2 questions
No, dataset() does not support storing string() objects. dataset() automatically converts string() objects to a cell array of ch...

1 giorno ago | 0

Answered
Ylim for bar subplot
subplot(3,1,3); By default ylim() applies to the current axes. You just called subplot() so the current axes is the third o...

1 giorno ago | 0

Answered
Error - I am new to Matlab and I just need help to graph this data I am getting a strange error.
for k = [2;20;200] An obscure fact is that "for" iterates along *columns* of the expression. Your right hand side is a colu...

1 giorno ago | 0

Answered
Matlab script generating corrupted workspace
I wonder if you are accidentally saving code to the mat file? In any case: do not save() a mat file directly to OneDrive espe...

1 giorno ago | 0

Answered
Using parfeval to call eval function not working - why?
Transparency violation. parfor and parfeval need to know the names of the functions at analysis time so that it can copy the cod...

1 giorno ago | 0

Answered
Use two different color schemes in contour plot
You will need to use two different axes, as only one colormap can be active per axes. The two axes can be in the same position. ...

1 giorno ago | 0

Answered
How to clean up the repeating element in an array?
x = [0 0 0 0 2 2 4] v = unique(x)

1 giorno ago | 0

| accepted

Answered
How to sub sym to a number in a matrix
subs(val, q(1:2), [VALUE1; VALUE2])

2 giorni ago | 0

| accepted

Answered
Is there any other function faster than sum(A,2) to get the sum of all rows?
Switching to columns can improve performance as it allows better use of hardware cache.

3 giorni ago | 1

Answered
unable to use solve or fsolve for linear system
those cross() calls each return a vector, and you compare the vector to [0 0 0] giving a vector result. You then try to store th...

3 giorni ago | 0

Answered
Can we choose step size rule in fmincon?
https://www.mathworks.com/help/optim/ug/optimizing-a-simulation-or-ordinary-differential-equation.html#btfixqo shows some contro...

4 giorni ago | 0

Answered
How to copy a matrix but skipping some row and column?
M = rand(24, 24); toskip = [1, 2, 4, 6, 8, 17, 19]; %version 1 M1 = M; M1(toskip, :) = []; M1(:, toskip) = []; size(M1) ...

4 giorni ago | 0

Answered
Matrix is close to singular or badly scaled. Results may be inaccurate.
You have enough duplicate t values that when you calculate "a" the rank does not reach 7; rank of a2*a does not reach 7, so your...

4 giorni ago | 0

| accepted

Answered
How to use use an anonymous function to fit data based on the fittype and fit functions.
There is no chance of fitting that function. fit() and fittype() pass in numeric data, and diff() of numeric data is always sma...

4 giorni ago | 0

Answered
Speeding up fread for random position in big file
In my experience, you can be more efficient on conversion of 12 bit data than what is done by fread() If memory serves raw = u...

4 giorni ago | 0

| accepted

Answered
How can I get this code to work? I am trying to fit the equation that contains step and delta function to experimental data. But I am getting the following error.
Your Energy are in the 500 range. exp(pi*energy) overflows double precision. Your code then divides by large values, but you hav...

4 giorni ago | 1

Answered
Is it possible to decide which line is variable names in readtable?
Yes, you can do that. For example, variable_row = 3; datatable = readtable(filename, 'VariableNamesRange', variable_row); In ...

4 giorni ago | 0

| accepted

Load more