Community Profile

photo

Walter Roberson


Last seen: Today
45.786 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
Shortcut to making an array
The shortcut is to not create those as separate variables the first time around. http://www.mathworks.com/matlabcentral/answers...

22 Minuten ago | 0

Answered
Can I utilize my colleges simulink on my purchased copy of matlab on my computer?
Possibly. If the college is running a network license manager serving MATLAB licenses, and is willing to give you access to that...

32 Minuten ago | 0

Answered
Why is this simple loop taking so much time?
When i is a particular value, say M, then you do M loop iterations total over the j. If we were to say that each loop iteration ...

etwa eine Stunde ago | 0

Answered
How can I generate audio tone?
Create a vector of samples that is ((sampling frequency) times (number of seconds)) long. Then you can play it with audioplayer(...

etwa eine Stunde ago | 1

Answered
how to use num2str
disp(['The absolute value of your array is:' num2str(y)]); You had an extra ) in your code.

etwa eine Stunde ago | 0

Answered
MATLAB Homework Problem: "Incorrect use of '=' operator" in a for loop
for (i = 2:0.5:15 && j = -2:0.5:12) You need to use a nested loop instead, such as for i = 2:0.5:15 for j = -2:0.5:12 ...

etwa 2 Stunden ago | 1

Answered
Laplace transform of integral
syms y(x) s t x R = int(y,t,0,t) y is a function of x, which is independent of t, so y(x) is constant as far as integrating wi...

etwa 2 Stunden ago | 0

| accepted

Answered
Error when using rgb2gray in a for loop.
nfile = 4; img = cell(nfile,1); Igray = cell(nfile,1); for i = 1:nfile img{i} = imread(sprintf('PShot%d.tif',i)); I...

etwa 4 Stunden ago | 0

Answered
Most effective way to read mulitple spreadsheets from .xlsx files
If you must use xlsread() for some reason, then see https://www.mathworks.com/matlabcentral/fileexchange/22365-function-for-fas...

etwa 4 Stunden ago | 0

Answered
function D = pdist2( X, Y, metric ) ↑ Error: Function definition not supported in this context. Create functions in code file.
You cannot copy and paste that into the command line. You would need to store it in a file named pdist2.m You will also need t...

etwa 15 Stunden ago | 0

Answered
How to plot a smooth graph?
t = linspace(0,10,18); Increase the 18 to something larger, such as 50.

etwa 15 Stunden ago | 1

Answered
How to change a specific line in a specific text file via matlab?
filename = 'AppropriateFile.txt'; outfilename = 'Revised_File.txt'; LineToChange = 65; NewContent = 'B 50'; S = filere...

etwa 16 Stunden ago | 0

| accepted

Answered
Remove quotes in last column of my table
You can use the Format option in readtable with a format of "%{yyyy-MM-dd}D %{dd-MMM-yyyy}D %{hh:mm}T ('%f', '%f', '%f')" Not...

etwa 16 Stunden ago | 0

Answered
compiled app can not run mfiles in a folder
You will never be able to generate a function or a script inside a compiled app and run it inside the compiled app. Never This...

etwa 16 Stunden ago | 1

| accepted

Answered
Unrecognized function or variable 'X'
Example: myX = randi(9, 17, 3); myY = randi(9, 5, 3) - 5; myD = pdist2(myX, myY, 'sqeuclidean'); That is, you need to have d...

etwa 17 Stunden ago | 0

Answered
How to Save multiple files from a loop with separate names
Before the loop outdir = 'Filtered_Data'; outprefix = 'Filtered_'; Inside the loop: outfile = fullfile( outdir, [outprefix...

etwa 17 Stunden ago | 0

| accepted

Answered
rainflow function usage in app designer causes the figure window open
When you do not specify output arguments for rainflow() then it calls a function to plot the results. Unfortunately there are a ...

etwa 17 Stunden ago | 1

| accepted

Answered
Open and run a .m in matlab into an another .m file
Inside first.m code a line second; %invokes second.m This will work provided that second.m is on your MATLAB path (such ...

etwa 18 Stunden ago | 0

| accepted

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.

etwa 23 Stunden 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 ...

etwa 23 Stunden 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...

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

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

ein Tag ago | 0

| accepted

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

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

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

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

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

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

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

ein Tag ago | 0

| accepted

Load more