Community Profile

photo

Walter Roberson


43,096 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
How to share a variable from one method to another method?
Make a private property to hold it. Possibly make it a dependent property

8 hours ago | 1

Answered
If statement: if none of doubles~= X then change the value of X to the closest to X...
One step: interp1 with 'nearest' But also very reasonable: [~, idx] = min(abs(Times - entered_time)) Times(idx)

9 hours ago | 0

Answered
How to evenly splice two block matrices together
The quick way is not to use individual variables for those. Put them in cell row vectors. Then Temp = [Acell; Bcell] ; R...

10 hours ago | 0

Answered
How to save a variable from an anonymous function?
There is no mechanism for returning values from nonlcon. You can any of the usual techniques for saving data from a function....

11 hours ago | 0

Answered
Conversion of double to structure error?
https://www.mathworks.com/help/matlab/ref/getframe.html getframe returns a struct not an array of double

14 hours ago | 0

Answered
How can I find RGB values of a matrix of coordinates of an image?
rcenters = P( sub2ind(size(P), y, x, ones(size(y))) );

17 hours ago | 0

Answered
How to put a struct files into a new folder
destdir = 'D:\Data\MDA\MDA Matlab\Area'; files = dir('D:\Data\MDA\MDA*\cell*_Area.csv'); fullnames = fullfile({files.folder},...

1 day ago | 0

Answered
Why fwrite is ~320x slower in the second interation and onwards when writing interleaved data?
fseek after end of file followed by fwrite, results in the data being written at eof. This is contrary to POSIX which requires t...

1 day ago | 0

Answered
Concatenating YCbCr channels gives distorted colors
This is expected. Your conversion to Y Cr Cb is producing data that is not integer data class. When you imwrite floating point t...

1 day ago | 0

Answered
How can I solve this problem/Error ?
test.jpg and tumor.jpg are both 128 x 128, but all of the other files in the directory are 256 x 256. You cannot multiply a 128 ...

1 day ago | 1

Answered
why do i get this error when i try add a working code to guide
x=str2num(get(handles.Txo, 'string')); y=str2num(get(handles.Tyo, 'string')); Those will result in x and y being defined as nu...

2 days ago | 1

| accepted

Answered
How can I change number on colorbar caxis?
Record the handle of the colorbar when you create it. Set the Ticks property of the handle to the list of values you want (or po...

2 days ago | 0

Answered
Setting range for each color in the colorscale
https://www.mathworks.com/matlabcentral/answers/232457-how-to-create-and-use-mixed-colormaps-associated-to-positive-and-negative...

2 days ago | 0

Answered
what is the difference between data chunk and buffer in matlab?
MATLAB does not generally use the term "data chunk". It does occur in some contexts: HDF4 and HDF5 files, where it reflects te...

2 days ago | 1

| accepted

Answered
How can I make a vector divide 1 by increasing numbers?
i = 1; while i <= 10 v(i) = 1./i; i = i + 1; end

2 days ago | 0

Answered
predict function for svm supported with matlab coder or not ?
https://www.mathworks.com/help/releases/R2018b/stats/classreg.learning.classif.compactclassificationsvm.predict.html#bvnomkd-7 ...

2 days ago | 0

| accepted

Answered
how to update R2018a to R2019a
MATLAB cannot be updated between releases: you can only install additional new releases (provided you have access to them). If ...

2 days ago | 0

Answered
Write a function called blur that blurs the input image
A=B([p:q],[r:s]); B(i,j)=mean(A(:)); You are overwriting B as you go. You should be storing into a different a...

2 days ago | 0

Answered
indexImages() fails to run
R2018b requires at least Sierra.

2 days ago | 1

| accepted

Answered
GUI red, blue, and green channels
[filename, filepath] = uigetfile(); if ~ischar(filename); return; end %user cancel fullname = fullfile(filepath, filename);...

2 days ago | 0

| accepted

Answered
how to make a file .mat as a function input and load it inside the function
data = load(filemat); Now the variables you need will each be fieldnames of the struct data

2 days ago | 0

| accepted

Answered
wiil student liesence help me in my project of "ANALYSIS OF DIFFERENTIAL PROTECTION SCHEMES
A Student license does not expire. However it is only valid while you are enrolled in a degree granting institution. Once you gr...

2 days ago | 0

Answered
More then one row in uitable
It is possible to modify the row table height at the Java level. See undocumentedmatlab.com for details on uitable Java Other...

3 days ago | 0

Answered
how to turn back into a loop after using Break command in the loop
No, there is no way to do that in the way stated. Once a loop is exited, the only way to get inside it again is to start it over...

3 days ago | 0

Answered
Selecting a random digit from a vector except for one digit that should not show except when at least 5 of the other digits were shown
min_before = 5; lb = 0; ub = 9; candidates = lb:ub; special = randi([lb ub]); not_special = setdiff(candidates, special); o...

4 days ago | 0

| accepted

Answered
How to use fmincon to fit parameters to observed data?
For this kind of fitting, lsqcurvefit() is typically much faster. However, for nonlinear models, it is common for lsqcurvefit() ...

4 days ago | 1

| accepted

Answered
delete repeated times from matrix
[unique_itime, Aidx] = unique(itime, 'stable'); corresponding_irrad = irrad(Aidx);

4 days ago | 0

| accepted

Answered
Breaking changes to jsondecode between 2018a and 2018b?
readIn = native2unicode(fread(fID, [1 inf]), 'UTF-8'); That is, you were trying to send a column vector to jsondecode and it ne...

4 days ago | 0

| accepted

Answered
Deblank an empty vector
"Because Reasons" The preservation of the shape of empty vectors is not suggested anywhere in the documentation, so this is not...

4 days ago | 0

| accepted

Answered
How to do one hot encoding of unusual letters in matlab?
https://machinelearningmastery.com/why-one-hot-encode-data-in-machine-learning/ describes One-Hot Encoding (a term I was not awa...

4 days ago | 0

Load more