Community Profile

Walter Roberson

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

All

バッジを表示

Content Feed

How to reduce decimal places displayed in symbolic matrix?
vpa(eta, DIGITS) Note that exponents might not be affected in some cases

"Index exceeds the number of array elements (2)." error that always gives the index size observed as one less than the vector i am entering
When you pass numeric values to diff then it is the difference operator, X(2:end)-X(1:end-1). The result always has one fewer en...

How to display coordinate from for loop?
if hrms == limit disp([x, y]) break; end But what do you want to do if no such point is found?

1日 前 | 0

Trying to use for loop for 2D cell array of {1X4}(1X11}
cellfun() requires a function handle for the first parameter (with some obscure exceptions.) cellfun() requires a cell array fo...

1日 前 | 0

Pre-allocating speed for an array that change size on every loop iteration
Matrix(:,2:2:end) would give you a 1000 x 500 matrix extracted from the even columns. You could reshape() that if there was rea...

1日 前 | 0

Implement an arbitrary number N nested for loop
Is there a very simple and elegant way to do this? No. There are relatively compact methods involving ndgrid() and cell arrays...

1日 前 | 0

I'm trying to find abrupt changes in the spectrogram of an audio using the findchangepts function. However, every time I get the error: Expected input number to be finite.
Suppose that somehow one of the output powers in pxx were exactly 0. Then pow2db() would be -inf there, but findchangeptrs() can...

1日 前 | 0

'polyfit' for parametrized curves.
It is possible for polyfit to fit a parametrized curve (x(t), y(t))? No, polyfit is strictly restricted to polynomials of the f...

1日 前 | 0

Inexplicable Symbolic Function problem
xi is not a function. diff(xi) is going to search the expression xi looking for symbolic variables, find xi, and take the deriva...

1日 前 | 0

| 採用済み

FFT error 'not supported to carry out script fft as a function'
you named your file fft.m which makes it impossible to call the Mathworks fft function. You need to rename your fft.m

2日 前 | 0

How to use matlab to achieve multiple cycles, as shown in Figure 1
ivals = 1:3; jvals = 1:3; numi = numel(ivals) ; for idx = 1:numi i = ivals(idx) ; j = jvals(idx) ; dis...

2日 前 | 0

Is my code correct?
You should rarely plot an image. plot() is for creating line plots. Your code will produce plots with one line for each column ...

2日 前 | 0

| 採用済み

How to store data in multiple matrix from table
if thrustslope >= abs(0.2) It is possible that is never true. elseif thrustslope == 0 It is possible that is happening very e...

2日 前 | 0

Can someone check my code, I am unsure if it is correct.
Your x is uniform increase. Its gradient is constant -- every entry is a fixed value greater than the one before. You are plott...

2日 前 | 0

| 採用済み

How can I properly change a row in my matrix table in excel into letters?
Sx = categorical({'Male', 'Female'}); nexcel.('Height (cm)') = Sx(nexcel.('Height (cm)')); I think people are going to find it...

2日 前 | 0

| 採用済み

Cone Detection Issues Question
If the purpose is to detect traffic cones, then you must train your detector on a set of images, some of which include cones and...

2日 前 | 0

Is my code wrong because why am i getting this output? Use the MATLAB command conv2() to convolve image3 with itself. What is this process referred to as? Show the result.
The image you posted is an RGB image, not a grayscale image. You cannot use conv2() with it, not unless you select out a single ...

2日 前 | 0

Can someone explain this code please? This was my question: Add the pixels of image1 to image2 in order to create a new image using for loops.
[r,c,n] = size(img1) assigns the number of rows in img1 to r, the number of columns in img1 to c, and n is assigned the product...

2日 前 | 1

| 採用済み

How can I get the numbers from GUI edit text in the contex like (1,2,3) ?
S = strtrim(get(handles.initial_point,'String')); nums = str2double(regexp(S, '[\s,]+', 'split')) This allows spaces and/or co...

2日 前 | 0

surface plotting.surface plot poroblem. Please I want help. An error appears when running
w = 1; k=1; figure tspan = linspace(0, 5); %must be a vector of length 3 or more zvals = 0.1:0.01:0.5; numt = length(tspa...

2日 前 | 0

Open .fig files for editing without having MatLab
The interactive edit tools such as Property Inspector are not available in compiled executables. You could write your own code...

2日 前 | 0

Terminal works but cant use scripts or functions
I suspect you are being hit by the Linux-related tmpfs bug. See https://www.mathworks.com/support/bugreports/2856360

2日 前 | 0

How Do I Get My Script To Work For Just One Figure Window? Currently It Loads Into Two
You are using shared variables that are being examined or set within callbacks set on the graphics objects. Now, when you creat...

2日 前 | 0

| 採用済み

Command, replacing data points at given field indices with the average of the values before and after
What if you assign nan at those locations, and then use fillmissing ?

2日 前 | 0

using trapz in a for loop
int=trapz(s(1:i),ue(1:i)); when i is 1, that would be trapz(scalar,scalar) . But when you trapz() and the second parameter is ...

2日 前 | 0

Adding Noise To An ECG Signal
signal = load ('ecgsignals.txt'); plot(signal); xlabel('Samples'); ylabel('Electrical Activity'); title('ECG Signal Values i...

2日 前 | 0

Why my plot in MATLAB LiveEditor is mirrored both on horizontal and vertical axes?
https://www.mathworks.com/help/matlab/views.html Your camera view might not be what you expect, or perhaps the camera looks d...

3日 前 | 0