Walter Roberson
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.
C, MATLAB, Shell, Perl, Fortran
Spoken Languages:
English
Statistics
RANK
1
of 282,499
REPUTATION
132,846
CONTRIBUTIONS
37 Questions
58,941 Answers
ANSWER ACCEPTANCE
48.65%
VOTES RECEIVED
17,752
RANK
of 19,055
REPUTATION
N/A
AVERAGE RATING
0.00
CONTRIBUTIONS
0 Files
DOWNLOADS
0
ALL TIME DOWNLOADS
0
CONTRIBUTIONS
0 Posts
CONTRIBUTIONS
0 Public Channels
AVERAGE RATING
CONTRIBUTIONS
0 Highlights
AVERAGE NO. OF LIKES
Content Feed
How to select specific files from a list
<https://www.mathworks.com/help/matlab/ref/endswith.html>
4 hours ago | 0
Linking two sets of data to be in line with eachother
Perhaps idx = interp1(loadValues1, 1:numel(loadValues1), loadValues2, 'nearest')
4 hours ago | 0
Align table data to the left
Yes. You could copy all of the code having to do with implementing tables. Then modify it so that tables inherit from matlab.m...
7 hours ago | 0
Getting an equation from a signal transfer function
Your formula for calculating the transfer function is not correct. Observe this simple example: syms t f1 = sin(t) f2 = sin(2...
1 day ago | 0
Can't solve the equations
You had a number of places where you were using the character ⁄ which is the "fraction slash" https://www.compart.com/en/unicode...
1 day ago | 0
Printing a calculated function.
syms t T x(t) = cos(8*pi*t) y(t) = rectangularPulse(-2.5, 2.5, t) z(t) = int(x(t)*y(T-t), T, -inf, inf) %continuous con...
1 day ago | 0
Trying to Vectorise Cell Allocation to Remove For Loops
Your coordinates are the same size for each cuboid, and the size is predicatable. Use a numeric array instead of a cell array. ...
1 day ago | 0
Issue loading classifier created with a previous version of Matlab
You do not have the Statistics and Machine Learning toolbox installed and licensed on the new system.
1 day ago | 0
Jacobian matrices of 6DOF robot not calculable
Here is a performance improvement trick: syms J_ [6 6] detJ_ = det(J_); %will be fast detJ = subs(detJ_, J_, J); This wil...
1 day ago | 1
| accepted
reduce resolution of an MRI image
When you fft() a 1D signal, the first output bin is sum() of the 1D signal. Now, if you were to think about sum() of the signal ...
1 day ago | 0
Find a parameter in a multi-tiered structure
You are perhaps looking for something that MATLAB refers to as "dynamic field names"; https://www.mathworks.com/help/matlab/matl...
2 days ago | 0
How to export data from an image histogram to an Excel file
T = table(x, count, 'VariableNames', {'Pixel Value', 'count'}); writetable(T, 'NameOfTheSpreadsheetGoesHere.xlsx');
2 days ago | 1
| accepted
Problem plotting sequential data files with headers
readtable with 'HeaderLines' option, after which you can table2array if you want. You might potentially need to use the ReadVari...
2 days ago | 0
caret on macbook pro
'ˆ' + 0 '^' + 0 That is, you might possibly be using the Modified Letter Circumflex Accent https://www.compart.com/en/unicode/...
2 days ago | 0
solve() "Unable to find explicit solution"
(I am absolutely positive I had already answered this, but there is no trace of that...) solve() cannot solve for functions. Yo...
2 days ago | 1
Finding Solution to Inequality in Matlab
Turn inequalities into equalities by adding a positive (or non-negative) variable representing how much more one side is compare...
2 days ago | 0
How to overwrite existing text file without saving as new file
The easiest approach in MATLAB is to read the entire file, change the last line, and write out the result to the original file n...
2 days ago | 0
Solve in a loop - Unable to perform assignment because the indices on the left side are not compatible with the size of the right side
You would get that error if solve does not return exactly one solution, such as if it returns no solutions or returns two soluti...
3 days ago | 0
Solve system of equations when plotting
t = 1; t2 = 1; k = 1; k2 = 1; a1 = 1; syms a2 a3 b1 b2 b3 phi psi eqns = [b1 == a1*t + a2*1j*k,b2 == a1*1j*k + a2*t, b3==a...
3 days ago | 0
Matlab code wont disply the figure 2
h is not initialized so you cannot test if h~=0; delete(h); end
3 days ago | 0
| accepted
Create mesh from matrix
a = [0 2 3; 0 2 4]; b = [ 0 2.3 4; 5 5 3]; h = size(a,1); w = size(a,2); idx = reshape(sub2ind([h, w], 1:h*w),...
3 days ago | 0
| accepted
Regionprops handling of big images
Splitting image in small parts would be the obvious choice but it could split a connected region in 2 or more subimages Any met...
3 days ago | 1
| accepted
quaternion does not work in matlab
As an experiment try quat = quaternion([0,0,pi/4; 0,0,-pi/2],'euler','XYZ','point'); The R2022a documentation https://w...
3 days ago | 2
| accepted
To plot 1D temperature distribution plot versus lenght of the channel of the fin
Lvals = [500, 750, 900, 950, 1000, 1050, 1100, 1500]; numL = numel(Lvals); N = 100; dx = L/(N-1); T = zeros(N,numL); Tb...
4 days ago | 0
How to get numerical equation for my code?
Nothing in the symbolic toolbox can be compiled or had code generated for it. Nothing . You need to use an interactive session...
4 days ago | 0
Why are there different results of 'int' function? (regarding 'int' and 'double' function
It looks okay to me. int() is not a numeric integral: it is a request to calculate the integral to full theoretical precision. ...
4 days ago | 0
integral function returns 0 value
The numeric integration is too low of a precision and is giving a result that is very wrong. format long g Q = @(v) sym(v); ...
4 days ago | 0
How to fix a bug with 'sum' function?
These days, you can get an "undefined function" under the following circumstances: You are defining a function; and Somewhere ...
4 days ago | 0
Extract values from colormap
Put your color_range information together into one 12 x 6 array. Extract the first 3 columns, divide by 255 to get colors in the...
4 days ago | 1
| accepted
Having issue trying to solve a group of errors.
total_weight = m1 + m2 + m3; That is a variable [result, fval] = fmincon(@(x) total_weight(x), initial_guess, [], [], [], [], ...
4 days ago | 0