Community Profile

# Walter Roberson

##### Last seen: Today
50 930 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

Appending multiple variables onto a single file
dinfo = dir('*.mat'); filenames = {dinfo.name}; nfile = length(filenames); hasmap = false(nfile,1); for K = 1 : nfile ...

ungefär 11 timmar ago | 0

| accepted

what does the function handles do in matlab?
handles is not a function. It is a struct. handles by itself has no special meaning; it could have been called anything. The c...

ungefär 12 timmar ago | 1

Any value (different values) I enter for TOLERANCE and ITERATION gives the same results(Answer( . It is supposed to give different answers . I don't know why this is occurring.
You exit the loop when you reach the tolerance. What happens if you exit the loop no later than 5 iterations? Then giving 20 in...

ungefär 12 timmar ago | 0

Why does the Fourier transform of a vector cannot tranfroms back into it itself in an exact manner, through ifft(fft())?
Floating point round-off. format long g a = rand(16,1); b = ifft(fft(a))-a; plot(b) [min(b), max(b)] ans/eps The values ...

ungefär 12 timmar ago | 0

Linear Label on Logarithmic Plot
ax = gca; ax.YAxis.Exponent = 0;

ungefär 12 timmar ago | 0

| accepted

Solving non-linear ODE
Your equation has 1/sqrt(t) and initial t of 0. That gives you 1/sqrt(0) -> 1/0 -> infinity at the start EP_equation functio...

ungefär 12 timmar ago | 0

| accepted

Plot function cannot work normally
Your file E:\MATLAB Inc\MATLAB 2018B\toolbox\matlab\graphics\gobjects.m is corrupt. You will need to restore it from backup (if ...

ungefär 13 timmar ago | 0

| accepted

too many input arguments error when i pass struct to my function
f = @(x)CostTimeDCal1; That says that when f is called, it should ignore its single input parameter and call CostTImeDCal1 with...

ungefär 14 timmar ago | 1

| accepted

how to get keyboard in matlab
psychtoolbox http://psychtoolbox.org/ has several input methods that do not require use of figures to receive typing.

ungefär 14 timmar ago | 0

Matlab gives error on empty line
The important part is Untitled line 43, which is the assignment to K_fc . On that line you have three places where you have ex...

ungefär 18 timmar ago | 1

Remove Figure window from appearing at all in program
Correct, if you set a figure visibility off, then the sequence of code you use will not display it to the screen but will save i...

ungefär 21 timmar ago | 0

Index exceeds the number of array elements (2)
y(6) Your code expects 6 (or more) boundary conditions are going to be passed in y0 = [L*cos(alfa);L*sin(alfa)]; but ...

ungefär 22 timmar ago | 1

| accepted

How to evaluate a function that has been saved to a variable
%provided that x is symbolic d1(x) = diff(f(x)) d2(x) = diff(f(x),2) d3(x) = diff(f(x),3)

ungefär 23 timmar ago | 2

| accepted

Getting Input Error With Code
You need to rearrange your code. DissMale = abs(.50 - Crime_Male); DissFemale = abs(.50 - Crime_Female); [R,C] = size(DissMal...

ungefär 23 timmar ago | 0

| accepted

Solutions are only valid under certain conditions
You can get four solutions. However, the solutions will be effectively useless, and the conditions under which they apply will b...

ungefär 23 timmar ago | 0

| accepted

How to reconstruct a matrix?
x = [8, 9, -3, 9, 5, -4, -1, 3, 10, 10]; y = [-6; 4; 4; -2; 2]; z = [diag(y), x(1:5).'; x(1:6)]

ungefär 23 timmar ago | 1

| accepted

Regexp match a string only if it is not preceded by another string
pattern = '(?<!blowing )snow'

en dag ago | 1

| accepted

GUI Static Text didnt show anything
We cannot tell for sure what size x is. If inputmatrices is a multi-line edit field in which there was one entry per line, then ...

2 dagar ago | 0

Stuck at a command input
You accidentally created your own load.m that is interfering with using MATLAB's load() function. Also, it appears that you mig...

2 dagar ago | 0

Naming variables from one column Import file
No. When you are importing variables manually using the import tool, then you are stuck with what the import tool provides. If ...

2 dagar ago | 1

| accepted

how to get values of a square matrix at an degree from center & how to get end points of y
improfile() if you have the Image Procesing Toolbox. If not, then the code for improfile() is based upon interp2()

2 dagar ago | 1

| accepted

Errors with fprime of Newton's method
There are two completely different diff() functions in MATLAB. The main one works with numeric data, and for it, diff(x) is x(2...

2 dagar ago | 0

| accepted

A Mathematica script that deals with multidimensional arrays needs to be converted to Matlab. How to do it?
https://library.wolfram.com/infocenter/MathSource/577/ is a convertor from Mathematica code to MATLAB code.

2 dagar ago | 0

Fmincon - Variable dependent constraints
lb = [1, 1/20, 2/20]; ub = [2, 2/10, 2/5]; A = [ 1/20, -1, 0 -1/10, 1, 0 0, 2, -1 -1/5, 0, 1 ...

2 dagar ago | 2

| accepted

num2str error in converting an integer
You used the function name num2srt but the real function name is num2str

2 dagar ago | 0

| accepted

Subtracting complex number from a discrete signal
A = 123 B = -0.000053 + 0.0030995i C = A - B In other words, you do not need to do anything special to convert the signal ...

2 dagar ago | 0

Matlab struct with names and sizes of the mat.file
Use whos() with the '-file' option and extract the required data from that.

2 dagar ago | 0

writing/exporting a plot into a file
Newer releases: see exportgraphics() https://www.mathworks.com/help/matlab/ref/exportgraphics.html Older releases: see getfram...

2 dagar ago | 0

textscan: Instantaneous out of memory error when accessing very large file (only with newest Matlab versions)
specify the encoding on your fopen() so that the i/o library does not have to read through the entire file to ddetermine the enc...

2 dagar ago | 0

| accepted