Community Profile

photo

Walter Roberson


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

  • Roberson Cup
  • Most Accepted 2019
  • Most Accepted 2018
  • Solver
  • First Review
  • 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

View all

Contributions in
View by

Answered
How can I animate this plot3?
geoplot3() returns a line object. You can pull the XData, YData, ZData coordinates out of the line object and delete the line ob...

7 minutes ago | 0

Answered
Call mex function using system()?
In Linux, executables can have any valid file name. The file extension is not considered by the operating system when deciding h...

12 minutes ago | 0

Answered
Using the Cancel button in uiprogressdlg to immediately stop execution
https://www.mathworks.com/matlabcentral/answers/496530-using-timer-how-can-i-cleanly-exit-a-function-execution-when-the-timer-fi...

35 minutes ago | 0

Answered
Creating regenerative random numbers
rng(655321) %or use any other positive integer constant

1 hour ago | 0

Answered
valid indices for 'output' are restricted in parfor loop
for j= 1:100 SNR = list(j); base = (j-1)*1000; parfor i = 1:1000 totallist(base+i,1) = SNR; ou...

1 hour ago | 1

| accepted

Answered
How to get matlab to read the code
Your code has load(strcat('C:\Users\User\Dropbox\My PC (LAPTOP-8G4JCC0U)\Documents\onscale',num2str(i),'\2d_simple_array.ma...

3 hours ago | 0

Answered
How can I create a matlab matrix below?
N = 6; diag(-2*ones(1,N)) + diag(ones(1,N-1),-1) + diag(ones(1,N-1),1)

3 hours ago | 0

Answered
How can i find unknown variable in matrix
syms D [2 1] syms AE sols = solve([0; -2] == AE * [0.405 0.096; 0.096 0.128] * D + [0; 0],D) simplify([sols.D1; sols.D2]) Th...

3 hours ago | 0

| accepted

Answered
I need help figuring the code out.
You can use a Monte Carlo method: format long g R = randi([2 3]) xy = rand(10000,2) * exp(R); x = xy(:,1); y = xy(:,2); mas...

4 hours ago | 0

Answered
Using isnan to check if there is any NaNs in a window and setting all the values to NaN if there are any.
for i=1:11:T; for k=1:3; if any(isnan(y(i:i+11,k))) X(i:i+11,k) =NaN; end end end

4 hours ago | 0

| accepted

Answered
How to convert cell to matrix
new_matrix{i}=t{:,i*3};

7 hours ago | 0

| accepted

Answered
run the script without opening the figure, its possible?
set(0, 'DefaultFigureVisible', 'off') before you run the code. This will last for the rest of your MATLAB session unless you r...

7 hours ago | 1

Answered
How to define k in bcfun?
In bcfun, for ya, you sould calculate k based on the x that would be used for the first boundary condition, and for yb you shoul...

7 hours ago | 0

Answered
How do I declare varibles whose outputs are expected from Matlab simply without so many rules, like for example in c++?
You are trying to construct a vector of function handles. You cannot do that in MATLAB. This is because in MATLAB, () indicates ...

11 hours ago | 0

Answered
How to convert dataset of .mat to .tif files?
You need to use the Tiff() class https://www.mathworks.com/help/matlab/ref/tiff.html Use SamplesPerPixel = 38, and use ExtraSa...

20 hours ago | 0

Answered
Can we apply scatter3() on high dimension matrix?
Yes, but it can become quite difficult to understand. You can use scatter3(x, y, z, PointSize, Color) Here PointSize and Colo...

20 hours ago | 0

Answered
Using Two Expressions together in factor()
syms x y f = arrayfun(@factor, [x^2-y^2,x^3+y^3], 'uniform', 0); vertcat(f{:})

20 hours ago | 0

| accepted

Answered
infinite Integration of hyperbolic function
y5=@(x)(4*hh.^2-4.*(x.^2)); y6=@(x)y4(x)./y5(x); You have a division by a constant minus 4*x^2 . But that can pass thr...

21 hours ago | 0

| accepted

Answered
How to find the unknown for singular matrix
nulls = null(A); candidates = nulls./nulls(:,1); The columns in candidates should start with 1 ... unless they start with NaN ...

21 hours ago | 1

| accepted

Answered
How to use "inspect" command in compiled code using MATLAB compiler?
inspect() is a development tool that I would not expect to be compilable . https://www.mathworks.com/products/compiler/supporte...

1 day ago | 0

Answered
Can I assign a variable to a number in a matrix from another matrix?
A = magic(7) E = eig(A) w1 = E(1,1) w2 = E(2,1) w3 = E(3,1) m1 = 3; m2 = 11; m3 = -7; output = [ m1*w1^2 ...

1 day ago | 0

| accepted

Answered
how do I merge multiple matrices into one?
One approach N = 4; %50 in your original Rows = 2; %1111 in your original %generate some data for illustration M = ar...

1 day ago | 0

Answered
I'm trying to convert Matlab code to C++ or C, but it has some errors. Can someone help me with this?
My adjusted version of the code passes compilation, and produces graphs. However I can demonstrate that the algorithm is wrong. ...

1 day ago | 0

Answered
I need help with running two for loops
you do not reset dif when you move on to the next j value so the while will end immediately.

2 days ago | 0

Answered
closed form solution in a system of equation
There are four families of solutions. [X1 == 1, X2 == (cos(Lz1*h*sin(RootOf(Lz1^2*cos(Z)^2*h^2+cos(Z)^2*Z^2*k1^2-Lz1^2*h^2))/c...

2 days ago | 0

Answered
How to import and read multiple .txt files where each .txt file contains multiple number of x,y,z values??
You can use https://www.mathworks.com/help/matlab/ref/matlab.io.datastore.tabulartextdatastore.html Or projectdir = 'name_of_...

2 days ago | 0

Answered
Error: Array indices must be positive integers or logical values.
Please read https://www.mathworks.com/matlabcentral/answers/395816-why-do-i-get-array-indices-must-be-positive-integers-or-logic...

2 days ago | 0

Answered
Solving one equation with multiple variables
Substitute the first known time and known s(t) to get a linear equation. Do the same with the other two known values. You will e...

2 days ago | 0

Answered
fminsearch with 3 variables
example f=@(v)v(1).*v(2)-sin(v(1)+v(2)) Instead of f=@(x,y)x.*y-sin(x+y)

3 days ago | 0

| accepted

Load more