Community Profile

photo

Walter Roberson


43.335 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 2018
  • 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
  • Knowledgeable Level 4
  • First Answer
  • Solver

View details...

Contributions in
View by

Answered
. Find a MATLAB built in function that is used to find the lowest common denominator of fractions.
[n1, d1] = rat(1/4); [n2, d2] = rat(1/10); com = lcm(d1, d2); Now that you have the least common multple of the denominators,...

etwa 2 Stunden ago | 0

Answered
How to catch the error thrown when unable to connect to an arduino?
>> try; arduino("/dev/cu.Bluetooth-Incoming-Port"); catch ME; disp('nan nan nah'); end nan nan nah The particular exception is...

etwa 21 Stunden ago | 0

| accepted

Answered
How to crop specific portion of a grayscale image?
img = imread('gray4.jpg'); im = imclearborder(255-imclearborder(255-rgb2gray(img)));imshow(im); hc = sum(im,2); mask = hc >= ...

etwa 21 Stunden ago | 0

| accepted

Answered
MOD for optimization variable
Introduce an extra integer variable and constrain equality x-3*extra = 1

etwa 22 Stunden ago | 0

Answered
how to make data packets from digital signals
https://www.mathworks.com/help/dsp/ref/buffer.html

etwa 23 Stunden ago | 0

Answered
how can I compare the length of two arrays?
You can look at length() However, you need to be careful about how you define length of an array. How does the length of 1 2 ...

ein Tag ago | 0

Answered
How to calculate average intensity of the image given in the form of a matrix?
mean2(TheArray)

ein Tag ago | 1

| accepted

Answered
Recording sound while acquiring data from pressure sensor that connected with arduino
You would use record(), which will permit you to continue running. You would set up a recording duration ahead of time. However...

ein Tag ago | 0

Answered
generate odd and even numbers from randn function in simulink
https://www.mathworks.com/help/dsp/ref/convert1dto2d.html -- reshape the vector to two rows https://www.mathworks.com/help/dsp/...

3 Tage ago | 0

Answered
How would I create a script to read files line-by-line to save memory
vary_every = 10000; expected_buffers = 10000; %1000000000 / 100000 group_every = 360; variances = zeros(1, expected_buffers...

3 Tage ago | 0

Answered
Translating sigma notation / summation / series and integral equation from Microsoft Word into MATLAB syntax and graphing / plotting
syms n t Q = @(v) sym(v); %convert to rational Pi = sym('pi'); f1 = Q(0.111627907); f2a = int((Q(-0.3072*10^(-5))*(t ...

3 Tage ago | 2

Answered
Why can't 32-bit values be converted to 24-bit values?
MATLAB does not have any 24 bit data type. typecast() is only for taking a block of memory and changing the interpretation of ...

3 Tage ago | 1

| accepted

Answered
sfit decimals output only 4 sig figs
coeffs = coefvalues(Your_sfit_object); num2str(coeffs, '%.15g')

3 Tage ago | 1

| accepted

Answered
Do I need Matlab Runtime to run a 3rd-party application if I have Matlab standalone?
The application requires a runtime (MCR) that exactly matches the version it was compiled with. Also, MCR.exe is responsible f...

3 Tage ago | 0

| accepted

Answered
How to close .m script file in GUI with a push button?
allEditors = matlab.desktop.editor.getAll; Now match the filename you want to close against {allEditors.Filename} to figure out...

4 Tage ago | 0

| accepted

Answered
Read Date time series format
S = fileread('update_engine.txt'); timestamps = regexp(S, '^.(.{18})', 'lineanchors', 'match'); ts_dt = datetime(timestamps, '...

4 Tage ago | 0

Answered
Error in audio uploading time.
You need to tell audiowriter that the sample rate, FS, is 8000.

4 Tage ago | 0

Answered
How to plot a series of numbers which some of them are inf?
plot(X, min(Y, ValueYouWantPlottedInsteadOfInf))

5 Tage ago | 0

Answered
optimization error ,when i used fmincon for three variables,getting same intial guess value in result
function [fval]=weight_testvariable(X) [...] X=[0.001;0.006;0.4]; You are ignoring the input and always calculating the same ...

5 Tage ago | 0

| accepted

Answered
How select a first value from the binary matrix ?
[~,idx] = max(matrix); output = sparse(idx,1:size(matrix,2),1,size(matrix,1),size(matrix,2)); Note: in the case where there ar...

5 Tage ago | 1

Answered
Unique not working - may be due to different datatypes in array
Those are not different datatypes. When you see the same array displaying 7.00000000000000 and 7 both, then what it tells you ...

5 Tage ago | 1

| accepted

Answered
how can call a function
Example: N = 100; o = zeros(N,1); a = zeros(N,1); b = zeros(N,1); c = zeros(N,1); d = zeros(N,1); for idx = 1 : N X = ra...

5 Tage ago | 0

Answered
how to use QPBLUR in Matlab?
QPBLUR appears to have been implemented as part of SNOPT which you would obtain a license for from http://ccom.ucsd.edu/~optimiz...

5 Tage ago | 0

Answered
"Index exceeds matrix dimensions."
Ztramo is an fi by co by noZ matrix. inv(Ztramo(:,:,i)) is a fi by co matrix if it works at all, which can only happen if fi an...

5 Tage ago | 0

| accepted

Answered
plotting multiple surfaces out of a 3d variable
Look in the File Exchange for "vol3d v2" Or perhaps you should just use slice https://www.mathworks.com/help/matlab/ref/slice.h...

5 Tage ago | 0

| accepted

Answered
Is there a way to continue operation during input()?
https://www.mathworks.com/matlabcentral/fileexchange/8297-getkeywait The below two mostly rely on Psychtoolbox https://ww...

6 Tage ago | 0

Answered
How to set constraints of griddata results are all non-negative?
The griddata and interp1 and interp2 methods that do interpolation (so everything except nearest or next or prev) are all subjec...

6 Tage ago | 0

Answered
Store function in an array
A = @(c) 3.*c +1; B= @(c) [A(c) A(c) A(c);... A(c) A(c) A(c);... A(c) A(c) A(c)]; C= @(c) det(B(c)); D= f...

6 Tage ago | 0

| accepted

Answered
Why do I not get the whole domain plotted?
You do not get a plot up to 20E9 because your calculation overflows to infinity. The below does not overflow to infinity, but i...

6 Tage ago | 1

| accepted

Answered
How can I set the colors in the legend if I show a number of legend elements which is lower thatn the number of plotted functions?
The trick for custom legends is to use for k = 1:num2show bh(k) = bar(nan, 'color', BarColors(k, :) ; end legend...

6 Tage ago | 0

Load more