Community Profile

# Walter Roberson

##### Last seen: Today
45 354 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.

View all

Contributions in
View by

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); ...

ungefär 6 timmar ago | 0

| accepted

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...

ungefär 7 timmar ago | 0

| accepted

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

ungefär 8 timmar ago | 0

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...

ungefär 8 timmar ago | 0

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...

ungefär 9 timmar ago | 0

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...

ungefär 9 timmar ago | 0

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, ...

ungefär 9 timmar ago | 0

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...

ungefär 10 timmar ago | 0

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...

ungefär 11 timmar ago | 0

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...

ungefär 12 timmar ago | 0

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...

en dag ago | 0

| accepted

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...

en dag ago | 0

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...

en dag ago | 0

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 ??? ...

en dag ago | 0

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...

en dag ago | 2

| accepted

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...

en dag ago | 1

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]

en dag ago | 0

| accepted

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...

en dag ago | 1

| accepted

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 ...

2 dagar ago | 1

| accepted

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...

2 dagar ago | 0

| accepted

"Index exceeds the number of array elements (1)." error
You made f an anonymous function but your grad is a symbolic expression not an anonymous function. You are invoking grad later a...

2 dagar ago | 0

Upgrade to R2019b Update 4. It solves several Catalina related problems. I would not expect that they would create an update...

2 dagar ago | 0

What exactly does char mean?
No, the first one you are using a %c format specifier. That does not directly have to do with the function named char(). The %c ...

2 dagar ago | 0

How to return an individual matrix from a function that uses multiple?
On your code whatever you assign to fun1 would be returned. You can also do things like function [d, e, f] = fun(a, b, c, n...

2 dagar ago | 1

| accepted

How to simply the code to reduce elapsed time
Creating an audiorecorder() object is expensive. You should avoid doing that each cycle. Create the object outside the loop and ...

2 dagar ago | 1

| accepted

Unable to perform assignment because the left and right sides have a different number
You do not assign to the global variables fit or penalty except inside the function main2(). Global variables that are not assig...

2 dagar ago | 0

How to get missing functions in Matlab 2018b about table and timetable operations?
The needed functions are present in r2018a, but were not showing up in the pop-up help because the pop-up help can only pop up f...

3 dagar ago | 0

Error: ()-indexing must appear last in an index expression.
You need to use a temporary variable, or you need to use a helper function, or you need to use the subsref function (which has a...

3 dagar ago | 0