Community Profile

photo

Walter Roberson


Last seen: Today
45,768 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
Unable to use a value of type 'VideoWriter' as an index
You have an existing variable named open or writeVideo or close so MATLAB thinks you are trying to index that variable.

2 hours ago | 1

| accepted

Answered
Why is it showing an "Unrecognized function or variable 'sample'" error code?
MATLAB does not define any function named sample Note that Ts(k) is a scalar, so you would be calling sample() passing in just ...

2 hours ago | 0

Answered
How do I remove all fields of a structure that have at least one NaN?
The question does not permit us to assume that the struct fields are exclusively numeric or that the fields will not be compound...

6 hours ago | 0

| accepted

Answered
MATLAB equivalent to VBA's 'With' Statement
No, there is not. In the special case that you are changing all of the fields, you can do something like level1.level2(3).time...

7 hours ago | 0

Answered
getting error in imread function
imread(fullfile(pathname, filename)) Is it really the case that you want to get a directory listing of files whose names start ...

17 hours ago | 0

Answered
How can I convert a vector [256 by 1] into 16 by 16 matrix
reshape(Matrix,16,16) or in some cases, reshape(Matrix,16,16).'

17 hours ago | 0

Answered
declare global var by string name
Yes there is. However, you should not do this. http://www.mathworks.com/matlabcentral/answers/304528-tutorial-why-variables-sho...

17 hours ago | 0

Answered
Creating .m file with variables to charge in another script
Yes. You can fopen() a .m file. If you are going to just add more lines to it without reading the existing lines, then use 'a' p...

18 hours ago | 0

Answered
How to convert the 1d into 3d data matrix?
reshape(TheList, 300, 300, 400) Depending on how the data was written, you might possibly need to use permute(reshape(TheList,...

19 hours ago | 0

Answered
global variables Pattern Search
No, that is not true. You can use global variables with parallelisation. However, the initial value of the global variables wil...

19 hours ago | 0

| accepted

Answered
MATLAB App designer - Standalone - Uigetfile (m.file)
Compiled applications can only run() scripts that were compiled into the applications. When you obtain a file name from the use...

19 hours ago | 0

Answered
Modify values in a struct array
newvalues = 1:3; temp = num2cell(newvalues); [a.b.c] = temp{:}; Unfortunately this is not easy to do on one line, at least no...

21 hours ago | 0

| accepted

Answered
fminsearch with part of input function
No matter whether t, inlet_signal and outlet_signal are scalars or vectors, your line y=[y;y(end)*zeros((length(E_t...

21 hours ago | 1

| accepted

Answered
Maximum memory of MATLAB for 512GB workstation
Yes. The limit for 64 bit MATLAB is 262144 gigabytes per variable (really 262144 gigabyte total between all of the variables.) ...

1 day ago | 1

Answered
Error using horzcat Dimensions of arrays being concatenated are not consistent. for piano note frequency analysis.
audioread returns one column per channel. You are attempting to concatenate on a row rather than a column.

1 day ago | 0

Answered
Can readtable read variable opt in a loop?
Yes. https://www.mathworks.com/help/matlab/ref/readtable.html#d120e1047964 'sheet' and 'range' are both valid for "spreadsheet...

2 days ago | 0

Answered
need Matlab program to count the number of lines until dollar sign is given
Read about count() and extractBefore() and newline() . Just remember that if you find one newline then that means you have two ...

2 days ago | 0

Answered
plot data from cell array cellfun()
hold on; cellfun(@(C1) plot(cell2mat(C1), 'o-'), C); hold off

2 days ago | 0

Answered
Need matlab coding for the given c program
MATLAB cannot code that. scanf() reads from standard input, but MATLAB does not have standard input. If you had a fileid of an ...

2 days ago | 0

Answered
Want to change order with sortrows
sortrows(cartProd,[1 2 3]) or simply sortrows(cartProd)

2 days ago | 0

| accepted

Answered
how to obtain matrix with two symbolic equations with dsolve
lp(dp-qo*dpio/Q*exp(jjw/(k3*Q^.4))) You have requested variable lp indexed at expression dp-qo*dpio/Q*exp(jjw/(k3*Q^.4)) but th...

2 days ago | 0

| accepted

Answered
Negative zero when writing to file
value = value + 0;

2 days ago | 1

Answered
Summation of Function Handle Cells
fsum = @(x) sum(cellfun(@(F) F(x), f));

2 days ago | 0

| accepted

Answered
Need help with this error using fscanf
The size parameter for fscanf can be a scalar, or it can be a vector of values representing an array dimensions. It cannot be us...

2 days ago | 1

| accepted

Answered
Is it possible to have a table with a numerical index instead of strings?
data(string(k),'y') = 2*data(string(k-1),'u')

2 days ago | 0

Answered
Ode45: constraining values of variables evolution
See the ballode example for how to use Events to terminate ode integration and restart it with the new parameters. The nonnegat...

2 days ago | 0

Answered
Why do the 2 "identical" systems in the file attached lead to different results?
It is not clear to me where you are looking? Your top system has an algebraic loop, in theory; in practice it does not only bec...

2 days ago | 0

| accepted

Answered
Create a graph from a matrix with 1 and 0
Adj = [1 1 0 0 0 1 1 1 1 0 0 0 1 1 1 0 0 0 1 0 0 0 ...

2 days ago | 0

Answered
Cannot solve symbolic equation annalytically
Does anybody has an idea why the function (which is basically only a difference of sums of polynomials with some logarythmic fun...

2 days ago | 0

Answered
Dot indexing is not supported for variables of this type.
I suspect that the other files do not start with a numeric line before the column headers. I recommend switching to readtable()...

3 days ago | 0

| accepted

Load more