Community Profile

# Walter Roberson

Last seen: Today Actif depuis 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. I am currently caught up to T0099119; if you are waiting on a reply from me for an older issue, please send me a reminder.

Programming Languages:
C, MATLAB, Shell, Perl, Fortran
Spoken Languages:
English

All

#### Content Feed

Afficher par

A répondu
Hi, how should I display the name for image. Only Name without the pathways.
[~, imgName, extension] = fileparts(InfoImage.Filename); Then use either imgName alone or [imgName, extension] if you want to p...

environ une heure il y a | 0

A répondu
residue number system in MATLAB
MATLAB can be used to program any deterministic calculation that can fit into your computer memory. MATLAB is Turing-complete: y...

environ 5 heures il y a | 0

| A accepté

A répondu
why fft of an even and real signal in time domain gives imaginary part?
t = linspace(tmin,tmax,N+1); t(end) = [] ; Your signal must not return to origin in the final sample. You need a signal ...

environ 5 heures il y a | 0

A répondu
Why am I only receiving one value for theta3 and alpha3, do I need to use a "for" loop instead?
/ is not the division operator in MATLAB. A/B is like inner product of A and the pseudoinverse of B. It is for solving systems o...

environ 5 heures il y a | 1

A répondu
While I am running this code I get this error, could anyone knows how to solve it ? (Unable to perform assignment because the size of the left side is 1-by-41 and the size of)
b_vec=zeros(i_max,1); That is a column vector b_vec(1,1)=40; b_vec(ny,1)=10; for i = 2:i_max-1 fo...

environ 7 heures il y a | 0

A répondu
the error of 'Matlab can only run a file with a valid name'
You have used the green Run button to try to execute code that is stored in a file that is not named like a valid MATLAB identif...

environ 15 heures il y a | 1

A répondu
i want to set x-axis to be in Pico seconds , how to do that
ax = gca; ax.XRuler.Exponent = -12;

environ 21 heures il y a | 1

A répondu
What's the meaning of the bitset in code generation ?
Suppose you have 3 logical values, say MA_on MB_on MC_on . Then at the C code level you could store those as one byte each, and ...

environ 21 heures il y a | 0

A répondu
How to stream data into Matlab workspace in real time
See https://www.mathworks.com/hardware-support.html?q=&page=1 for a list of hardware vendors and associated support information....

environ 22 heures il y a | 0

A répondu
Plot data above current axis
There are several possible ways to proceed: Create two different axes() specifying Position for each one, possibly using 'Units...

environ 22 heures il y a | 0

| A accepté

A répondu
When I used "gamfit(data)", it says "X must be non-negative."
[r, c, s] = find(data<0); compose("Row %d column %d contains %g", r, c, s)

environ 23 heures il y a | 0

| A accepté

A répondu
How to assign point name to points in an array and then plot them ?
A = [0,1.5+1.5i,4.5i,-6.75+6.75i,-20.25]; Anames = {'', 'start', 'impulse', 'peak', 'relax'}; Ar = real(A); Aim = imag(A); s...

environ 23 heures il y a | 0

| A accepté

A répondu
Error when trying to play mp3 file
Your current directory is not one where old-victory-sound-roblox.mp3 can be found. It is recommended that you construct fully ...

environ 23 heures il y a | 0

A répondu
How to find the average of 3D matrices in a cell?
The code you already have should work. Or you could use the more compact meanB = cellfun(@(b) mean(b,3), B, 'uniform', 0); If ...

environ 24 heures il y a | 1

A répondu
Particle Swarm Optimization PSO
nVar = 1 VarSize=[7 nVar]; % Size of Decision Variables Matrix Well that is wrong. You do not have 1 variable, you have 7 va...

1 jour il y a | 0

A répondu
Need help getting a code to solve for a variable changing in size with a matching number of equations
q_gen = 1*(10^5); Numeric T(1) = -196; That is a specific numeric value. X = 0:L/(M-1):L; That is a vector of numeric v...

1 jour il y a | 0

A répondu
zeros of a matrix
You have accidentally created a variable with the name rand or the name size or the name zeros Also, to create a column of zer...

1 jour il y a | 0

A répondu
Convert 8x3 char to string sequence (MATLAB)
reshape(val.', 1, [])

1 jour il y a | 0

| A accepté

A répondu
Empty plot returning when I try to graph
M = sigmayytheta0(rr); Every iteration in i and j, you are overwriting all of M. At the end, your M will be a scalar. You sh...

1 jour il y a | 0

A répondu
Vectorizing unicode2native
%precompute L = false(1,MaximumPermittedCharacter) ; L(native2unicode(1:255,'windows-1252')) = true; %if you want to...

1 jour il y a | 0

A répondu
How conv2 works?
conv2 does conv() and then transposes the result and does a second conv() and then transpose back. Each conv() step operates ...

1 jour il y a | 0

A répondu
Not plotting the data
Your array cleanup has 4 rows and a fair number of columns. cleanup(:,2) is one column with of the 4 rows. You probably want to ...

2 jours il y a | 0

| A accepté

A répondu
how to plot a periodic function?
You do not need any loop. You generate one cycle based upon t1 t2 t3 t4 and piecewise(). Then you substitute mod(Time,t4) to the...

2 jours il y a | 0

A répondu
how to make function
Example: syms x1 x2 x = [x1;x2] f(x) = (x1^3 - 2*x2^2 + 3*x1*x2 - 5)^3 + x1*x2 xstar = x * [-5 9] f(xstar(1,:), xstar(2,:))...

2 jours il y a | 0

A répondu
How to realign PATCH object along with plotted 3D GRAPH network?
See hgtransform and makehgtform You would create a hgtransform() whose parent is the axes, and when you patch() you would tell ...

2 jours il y a | 0

A répondu
How to remove NaN from matrix / remove the dark blue pixels in the ocean
I suggest you experiment with @John D&#39;Errico FEX contribution https://www.mathworks.com/matlabcentral/fileexchange/4551-inpa...

2 jours il y a | 0

A répondu
A bug in MATLAB R2020b on MacOS Ventura; MATLAB code written on Windows 10 is not shown on MacOS Ventura 13.
https://www.mathworks.com/content/dam/mathworks/mathworks-dot-com/support/sysreq/files/system-requirements-release-2020b-macinto...

2 jours il y a | 0

A répondu
Trying to perform Fast Fourier Transform
importdata() can return any of three different data types, depending on the content of the file. If the file is text and has a...

2 jours il y a | 0

A répondu
Trying to solve systems of ODEs and graph answer
If you define a symbolic variable and use it in an expression, and later assign a numeric value to the same name, then that does...

2 jours il y a | 1

A répondu
val = Empty sym: 0-by-1
%DATA di = 0.04; % m alpha = 12.67; % degree beta = 2.66; % degree Ti = 291.65; % K Pi = 90; % bar Vi = 43.5; % m/s k = 1...

2 jours il y a | 0