Community Profile

photo

Walter Roberson


Last seen: Today
45,363 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 2019
  • Most Accepted 2018
  • Most Accepted 2017
  • Solver
  • First Review
  • 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

View all

Contributions in
View by

Answered
My program isn't plotting anything
All of your x are the same, and all of your y are the same. You are drawing a line from a point to itself over and over again. T...

6 hours ago | 0

Answered
Genetic algorithm plot diagram display
The *variable* that you create that has the same name as your *function*, is not used after it is assigned to, so the options yo...

10 hours ago | 0

Answered
How to Plot A 3D Ring of any given shape?
Create a reference set of vertices centered around 0, 0, and a description of faces joining them. I suggest using something comp...

12 hours ago | 0

| accepted

Answered
How to make group of ones more systematic approach?
Before the loop, struct2cell(Ribboned_100) . Then look at the fieldnames() of Ribboned_100, and match those against the names fr...

14 hours ago | 1

| accepted

Answered
Visualizing 3 dimensional array
Some of the basic ways to graph 4D data (3 independent variables plus one dependent variables) are: slice() isosurface() volu...

15 hours ago | 0

Answered
How to color an image according to orientation of objects?
When you regionprops(), also ask for PixelIdxList . Now, create a matrix orient = zeros(size(BW)); And loop through the stru...

15 hours ago | 1

| accepted

Answered
Unable to find explicit solution
vpasolve(k==0, 0.5) The starting guess can be anything from about 1e-3 upwards. There are a minimum of 3 different roots of th...

16 hours ago | 0

Answered
Plotting piecewise, data from matrices/vectors
To go straight down, you need to duplicate the x coordinate with the two different y values. stairs() automatically does the co...

16 hours ago | 1

| accepted

Answered
strjoin, string, remove a single space, while combining variables.
Join one fewer item in Y, and strcat() or + it on to the end. If you absolutely must use only strjoin, then join one fewer item...

16 hours ago | 0

| accepted

Answered
How can i display image from array element of cell??
for k=1:numel(fileNm) This = fileNm{k} ; if isempty(This) ; continue ; end imshow(This) ; pause(3); ...

1 day ago | 0

| accepted

Answered
How to get Matlab to read this in a .m file to another .m file
Replace fid = fopen('trapdata.m', 'r'); S = fscanf(fid,'%d') fclose(fid) with [f, a, b, n, N] = trapdata(); You do not use...

1 day ago | 0

| accepted

Answered
How to remove particular rows from a matrix?
[found, idx] = ismember(y, A, 'rows'); A(idx(found). :) = []; %delete one copy of the found ones

1 day ago | 0

Answered
How do I import a .itp file from molecular dynamics simulation
>> celldisp(textscan('; qtot', '%8s')) ans{1}{1} = ; ans{1}{2} = qtot When you use %s without a width, scann...

1 day ago | 0

Answered
Generate a 32-bit binary stream
sum(randi([0,1],1,32).*2.^-(0:31)) Or randi([0,2^32-1])/2^32 Or you can use rnd() or related to tell rand to use th...

1 day ago | 0

Answered
How do I find the location of the max value of a nd matrix efficiently?
[L{1:ndims(X)}] = ind2sub(size(X), max(X, [], 'all')) ; out = cell2mat(L); However if you want all the duplicates to sho...

1 day ago | 0

Answered
Automated process to save outputs into various MAT files
char(datetime('now', 'format', FORMAT_YOU_WANT)) strcat that with the base file name, fullfile() the directory into place, ...

1 day ago | 0

Answered
I am getting this error: Error using * MTIMES (*) is not fully supported for integer classes. At least one argument must be scalar. Error in RSA (line 4) n =p*q;
somehow you are entering integer data-type arrays in response the prompts for p and q. For example you might be naming variables...

1 day ago | 0

Answered
why xlswrite writes each letter of the string into each cell of excel?
You are probably passing a character vector, which is technically an array. Passing a cell array of character vectors will wo...

1 day ago | 1

| accepted

Answered
R2015a plot problem with ticklabel definition
You only ask for 5 ticks in your linspace, with labels derived from y2 not from what you linspace. Your first 5 y2 values are al...

1 day ago | 0

Answered
Matrix index is out of range for deletion and I cant figure it out
Suppose you delete row 4. What was in row 5 "falls down" to row 4,what was in 6 falls to 5, and so on. If you had a request to d...

2 days ago | 0

| accepted

Answered
I cannot see the plotted ecg signal.
When you load() a mat and assign to a variable the result is a struct with one field for every variable name loaded. You need to...

2 days ago | 0

Answered
Contour plot on top of surface plot
Although it is possible to hack the properties of contour to change where the z values appear, it is typically much easier to cr...

2 days ago | 0

Answered
How to Read and plot CSV file and delete infinity values from CSV file
https://www.mathworks.com/help/matlab/ref/rmmissing.html can be used since R2016b. That is, you use readtable() and let the ??? ...

2 days ago | 0

Answered
how to reduse the size of an array for meshgrid
N = 100; F = scatteredInterpolant(x, y, z); xvals = min(x):max(x); yvals = linspace(min(y), max(y), N); [X,Y] = meshgrid(xva...

2 days ago | 2

| accepted

Answered
Undefined function 'cos' for input arguments of type 'tf'.
An s or z generated by tf('s') or tf('z') is not a symbolic variable but laplace() and ilaplace() can only be used with Symbolic...

3 days ago | 1

Answered
How to create a function using the results of the other function (using handle)?
Verror = @(n) sum(Vms_mesh(Vms(n))- AE_MS_ex ); %AE_MS_ex is experimental vector with size[1*100]

3 days ago | 0

| accepted

Answered
Struggling with line()
The first parameter is a list of x coordinates. The second parameter is a list of y coordinates. The parameters are *not* sou...

3 days ago | 1

| accepted

Answered
Create macOS app from app designer on Microsoft Window.
No it is not supported. Hypothetically you install enough of the Linux subsystem and FSF gcc related software to cross compile ...

3 days ago | 1

| accepted

Answered
How to group individual plotted lines into one legend item
You cannot do what you want to do. You have two choicesb 1. record the handles returned by the graphic operations. Pass on...

3 days ago | 0

| accepted

Load more