Community Profile 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
• • • • • • • • • • • • Content Feed

View by

Vectors must be the same length.
Is it possible that you ran this code twice with more theta values the first time? You are not preallocating R so if you ran mul...

20 minutes ago | 0

How can i read files inside a folder?
foldername = 'SnowCoverJuly2000'; dinfo = dir( fullfile(foldername, '*.dat') ); dinfo(5:end) = []; %only want first 4 nfiles...

3 hours ago | 0

currency recognition using image Processing Techniques in matlab
You seem to be using https://www.mathworks.com/matlabcentral/fileexchange/47143-currency-recognition which does not define a dis...

3 hours ago | 0

How can I generate a comma separated list from the MATLAB vector s = [1, 2, 3, 4]?
s = 1:4; ExpandCell = @(C) C{:}; [A,B,C,D] = ExpandCell(num2cell(s))

7 hours ago | 0

code does not seem to work but is not giving any errors
a1(i,j)= (red(i-1,j-1)+red(i-1,j)+red(i-1,j+1)+red(i,j-1)+red(i,j)+red(i,j+1)+... red(i+1,j-1)+red(i+1,j)+r...

7 hours ago | 0

| accepted

I want to only interpolate shorter amounts of data and leave the longer amounts of NaN not interpolated.
max_length_to_interpolate = 17; %change as appropriate nanp = isnan(data(:).'); %must have row vector starts = strfind([f...

8 hours ago | 0

Not enough input arguments. And there is an error in "N = length(N_func);"
You cannot run that code just by clicking on the green Run button. You need to go down to the command line and invoke the code p...

9 hours ago | 0

How do i retrieve data from a vector of idexes?
Reachnext is a vector that contains the indexes of certain files i want Then Reachnext contains numeric values? But your code u...

10 hours ago | 0

how to plot exel data by loop
filename = 'TheFile.xlsx'; T = readtable(filename); [G, uids] = findgroups(T{:,6}); hold on h = splitapply(@(X,Y) plot(X, ...

10 hours ago | 0

One vs One when you use fitcecoc

23 hours ago | 0

| accepted

reading trivially sorted images 1 by 1 in loop
imgdir = 'C:\Users\Nikhil\Desktop\Manu Gowda\images'; Then in the loop, basename = sprintf('1mm%04d.jpg', i); im = imread(ful...

1 day ago | 0

| accepted

How to fully utilize my CPU and GPU for running my code?
When you use 'UseGPU', true then autoencoder trains only on the GPU, with the CPU being used only to manage the training. You c...

1 day ago | 0

How to add 'Tone' on digital pin of Arduino Uno?
Tone was not supported until R2019a... the version immediately after the one you are using.

1 day ago | 0

I am currently trying the quadcopter project, and I am getting errors in estimatorVars.
There was nothing that said what kind of error it was? Like "file not found" or "out of memory" or wrong datatype or index out o...

1 day ago | 1

| accepted

Read text file with multiple delimiters in a single row
Your timestamps are too low precision for it to be reasonable that you stop at milliseconds -- you have too many values that are...

1 day ago | 0

| accepted

Creating a table using cell arrays
Results = {randi(9, 11, 1); "R"+randi(9,11,1)} Groups = cellstr(('a':'k').') Table = table(Results{:}, 'RowNames', Groups)

1 day ago | 0

| accepted

how to convert complex number into double number?
siz=256; x=nan(1,siz+1); %<------------PREALLOCATE!!! y=nan(1,siz+1); %<------------PREALLOCATE!!! Z=0.78;% initial value of ...

2 days ago | 0

Unable to import txt file
train = fullfile(dataFolder, "train_FD001.txt"); [train_data1, train_labels1] = importdata(train)

2 days ago | 0

| accepted

keeping the variable names same
MATLAB uses Name/Value pairs in which the first element of the pair tells the option name and the second element of the pair ind...

2 days ago | 0

| accepted

remove grid lines completely
filename = 'something.fig'; fig = openfig(filename); ax = findobj(fig, 'type', 'axes'); set(ax, 'XGrid', 'off', 'YGrid', 'off...

2 days ago | 1

| accepted

Detection of pixels in image that are not in focus
"blur" is perceived when there is a loss of detail -- corresponding to loss of high frequency information. If you do a low pas...

2 days ago | 0

| accepted

run the program in matlab
T3=1e-9:1e-9:1e-6; for i=1:numel(T3) t3=T3(i); [b]=fminsearch(@(b) abs(trial0(complex(b(1),b(2)), t3)) ,[1,1]); ...

2 days ago | 0

How to convert the following UTC to serial date number?
format long g utc_t = '2018-345T02:19:02.175Z' utc_dt = datetime(utc_t, 'InputFormat', "uuuu-DDD'T'HH:mm:ss.SSS'Z'") time = d...

2 days ago | 1

| accepted

extract data from cell array
c{1,1}.name = 'Tom'; c{1,1}.age = 48; c{2,1}.name = 'Bob'; c{2,1}.age = 24; c{3,1}.name = 'Jim'; c{3,1}.age = 12; vec_age = c...

2 days ago | 0

| accepted

Searching word list for key letters
wordList = {'apples' 'orange' 'banana'}; ContainList = 'shu'; NotContainList = 'br'; mask1 = contains(wordList, num...

2 days ago | 0

How to find index of continous non-NaN values?
mask = ~isnan(Sal(:).'); %row vector needed starts = strfind([false mask], [false true]); stops = strfind([mask false], [true...

2 days ago | 0

Subs does not do the job
e=sym('e',[J 1]); e would be a vector containing symbols named e1 e2 e3 A=replace(A,'w','e(1)'); That e(1) will not be t...

3 days ago | 0

| accepted

How can I use conv() in a function handle and keep original vector size, but not use 'same'/'valid'?
a = [1,2,3] b = [1,2,3,4,5,6] FirstN = @(V,N) V(1:N) c = @(x) FirstN(conv(a,b(x(1))), numel(a)) However... you are using x(1...

3 days ago | 0

| accepted