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

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

Statistics

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

View badges

Content Feed

View by

Answered
The enviinfo function was used incorrectly, I don't know what went wrong.
It appears that the data file has a header that is Exposure (Ms) . This is not a standard ENVI header, but MATLAB tries to put...

etwa 2 Stunden ago | 0

Answered
How to put a legend automatically in PCA 3D Scatter Plot?
scatter3(score_PCA(:,1), score_PCA(:,2), score_PCA(:,3), 15, label, 'filled') That generates one graphical object legen...

etwa 3 Stunden ago | 0

Answered
Placing a slider control on a surf plot?
You are using surf() and you are not passing in an axes handle to surf(). In that combination, surf() is going to use gca() to...

etwa 3 Stunden ago | 0

Answered
integration of erf function
syms c p d cpd u x real Pi = sym(pi); phi(cpd) = 1/sqrt(2*Pi) * int(exp(-x^2/2), x, -inf, cpd) f = int(exp(-p)*phi(c*p+d), p,...

etwa 15 Stunden ago | 0

| accepted

Answered
read unstructured data with readtable function
The table is fixed width. Use fixed width import options; https://www.mathworks.com/help/matlab/ref/matlab.io.text.fixedwidthimp...

etwa 15 Stunden ago | 0

Answered
Invalid expression error when I try to introduce new variable.
You cannot just define a constant inside a class by assigning to it, and expect it to be available to your functions. You can c...

etwa 15 Stunden ago | 1

Answered
How to graph a function that consists of summations?
g = ga(:); T=(0.1:0.001:1); E = reshape(0:13, 1, 1, []) ; F1 = sum(-(E.^2).*g.*exp(-(E-13)./T),3); F2 = sum(-g.*exp(-(E-13...

etwa 17 Stunden ago | 0

Answered
zero pad array to multiple of 8
A_padded = A; new_rows = ceil(size(A,1)/8)*8; new_cols = ceil(size(A,2)/8)*8; if new_rows ~= size(A,1) || new_cols ~= size(A,...

etwa 19 Stunden ago | 1

| accepted

Answered
How to solve single non-linear equation?
syms A B n X(t) V(t) eqn = diff(V(t) .* X(t)/(1-X(t)), t) == A*n - A*X(t) - B*X(t) SE = simplify(lhs(eqn) - rhs(eqn)) collect...

etwa 20 Stunden ago | 0

Answered
I have a 2 dimensional array. I want to view it.
How do you want to view it? As text? trajectories(:,1) should display the first column. However it is possible that your MATLAB...

etwa 20 Stunden ago | 1

| accepted

Answered
May I know how convert tuple to dictionary in MATLAB
filename = 'https://www.mathworks.com/matlabcentral/answers/uploaded_files/744999/New%20Microsoft%20Office%20Excel%20Worksheet.x...

etwa 20 Stunden ago | 0

Answered
Converting values to units
values = randi([0 800], 1, 10) b = [-800 300 800]; mask = values < b(2); scaled(mask) = (values(mask)-b(1))./(b(2)-b(1)); sc...

ein Tag ago | 0

Answered
how to calculate theta
Xo = 1234; V = 20000; syms theta t = .1:.1:1; eqn = 3010 == Xo + (V .* cosd(theta)) .* t thetas = double(arrayfun(@(E) vp...

ein Tag ago | 0

Answered
Convert units to g
%need some data for demonstration t = seconds(0:0.5:10); y = randn(1, length(t)); %now do the work y_g = y ./ 9.80665; pl...

ein Tag ago | 1

| accepted

Answered
add multiple lines to a single plot without using "hold on/off"
%% Create Plots % Would like pressure dist overlaid on airfoil shape tiledlayout(2,1); ax1 = nexttile; plot(ax1,x,y); hold(...

ein Tag ago | 0

| accepted

Answered
Huge number of iterations
fcn = @() fopen( sprintf( 'chem_%d.txt', labindex ), 'wt' ); w = WorkerObjWrapper( fcn, {}, @fclose ); % a and b are cell arra...

ein Tag ago | 0

Answered
How to loop over a function call?
y = [y1, y2, y3, y4] fun = @(x) reshape(sum(arrayfun(@(Y) Least_square(x(:), Y), reshape(y, 1, [])),2), size(x))

ein Tag ago | 0

| accepted

Answered
Can not shift image relative to plot with Imtranslate
and shown with imshow(image) I do not recommend imshow() for this purpose: it does too many things to the axes that are not des...

ein Tag ago | 1

| accepted

Answered
Initializing all rows with one set of values in one half and another set in the other half
cA(:,:) = repmat([cA0*ones(1,(N-1)/2+1),Kw/cB0*ones(1,(N+1)/2-1)], size(cA,1), 1); Or consider nrow = size(cA,1); cA(:,:) = [...

ein Tag ago | 0

| accepted

Answered
Saving data array in Matlab data file (.mat) in App Designer
save('YourFileName.mat', 'NameOfVariable', 'AnotherVariable') Note that if the values you want to save are currently stored wit...

ein Tag ago | 1

| accepted

Answered
How to get same xlsread "raw" output whithout using xlsread?
mask = cellfun(@isdatetime, YourCell); YourCell(mask) = cellfun(@(DT) datetime(DT, 'format', 'dd/MM/yyyy'), 'uniform', 0); Now...

ein Tag ago | 0

Answered
how to join the values of different cells in different columns in one cell ?
T.Date = datetime(T.Year, T.Month, T.Day, T.Hour, T.Min, 0, 'Format', 'uuuuMMddhhmm'); Note: I did not use the format you asked...

ein Tag ago | 1

| accepted

Answered
Issue with numerical integration of two variable function
A = @(x, y) cos(x)+sin(y) B = @(x, y) A(x,y)-integral(@(X)A(X,y), 0 , 2*pi, 'ArrayValued', true) fsurf(B, [-pi pi -pi pi])

ein Tag ago | 0

| accepted

Answered
How to Solve matrix equations in Matlab
Optimal solutions, in the sense of smallest least-squared. Are there other solutions? Yes: you can ask to solve eqn2 with retur...

ein Tag ago | 1

Answered
Finding 8 points on an ellipse
Refering to https://math.stackexchange.com/questions/493104/evaluating-int-ab-frac12-r2-mathrm-d-theta-to-find-the-area-of-an-el...

ein Tag ago | 1

| accepted

Answered
Trying DIC 2D by ncorr
I notice that you are using a fairly old version of MATLAB. Still, uibuttongroup() should have been defined in your MATLAB. T...

2 Tage ago | 0

Answered
Error in plotting an equation given y data sets (y vs x)
Your code wants to calculate the formula for each y value, for all possible x values. But to do that, you have to make the symbo...

2 Tage ago | 0

| accepted

Answered
filtfilt fails with B=1, A=1 on matrix
It appears to be a bug. In context: filtfilt() calls filter() to do some of the work. When a and b are scalars, filter is goi...

2 Tage ago | 0

Answered
Clear symbolic from an equation and make it mathematical function
syms x f=(17*exp((281*x)/50000))/1000 + (4777*x*exp((281*x)/50000))/50000000 ff = matlabFunction(f); x=4.5:1:40.5; plot(x,...

2 Tage ago | 0

| accepted

Answered
how to find a float number
[is_there, idx] = ismembertol(-0.3340, y7) %options allow you to control tolerances y7(idx) Also, [~, idx] = min(abs(y7(:) -...

2 Tage ago | 1

Load more