
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 275,799
REPUTATION
129,811
CONTRIBUTIONS
36 Questions
57,657 Answers
ANSWER ACCEPTANCE
50.0%
VOTES RECEIVED
17,168
RANK
of 18,575
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
Getting an error "Error using erfc... Input must be real and full"
if a is negative and t is positive then sqrt(a*t) is square root of a negative value which is imaginary. You end up taking erfc ...
8 hours ago | 0
Need to test the validity of an application handle
Isvalid would do the trick, but it's not available in 2022b. isvalid with lower-case I has been available since at least 2006.
14 hours ago | 0
Why do I get the error message "Unrecognized function or variable 'sim'" in my Standalone Excecutable
You need Simulink Compiler; https://www.mathworks.com/products/simulink-compiler.html
18 hours ago | 0
Failed to create file modification time character vector
The file is probably corrupted; see https://www.mathworks.com/matlabcentral/answers/1859293-imfinfo-doesnt-work-in-r2022b-it-s-b...
18 hours ago | 0
How to fix the compilation problem?
This is a security concern. See https://www.mathworks.com/matlabcentral/answers/813140-confusing-warning-during-compilation-warn...
22 hours ago | 0
Hi i have a set of data which is temperatures in degree celsius ranging from 10 deg to 250 deg but i need to plot only the temperatures ranging from 20 and 70 degrees .
xlim([20 70]) Or possibly ylim() instead of xlim() Or maybe you need clim()
2 days ago | 0
How to input exponentials in transfer functions using Simulink?
If this must be implemented as transfer functions then you will need to copy the transfer function block several times, set the ...
2 days ago | 0
Save multiple variables into single -Ascii File with different column of [x:y:z]
out = [SSS, Lat, Lon]; save('20150131.asc', 'out', '-ascii')
2 days ago | 0
recalculation with different rsult respect to previous one
This can happen for a couple of different reasons: if the calculations involve random numbers. The random number use might not ...
3 days ago | 0
what is the unit of amplitude in matlab simulink?
The unit of magnitude for sine wave in Simulink is the "Finagle" . https://wiki.c2.com/?FinaglesVariableConstant
3 days ago | 0
How do I fix the error of arrays having incompatible sizes?
Yes, you need to loop over KC values. Your ndt is a vector with values calculated in terms of KC. And that means that X(1:floo...
4 days ago | 1
Please help with fsolve, i keep getting this error
Your posted code has Q0 = [120;21;24;23]; which is fine. But your error message is from running some other code -- code that...
4 days ago | 0
Error while creating fitness function
It looks to me as if you ran the function by pressing the green Run button. But possibly there is a place in SparrowSearchAlgori...
4 days ago | 0
pass input arguments of built in function as cell array or structure?
feval('plot', S{:}) feval does not support passing in any kind of structured input . Most functions do not support providing s...
4 days ago | 0
| accepted
Why am I getting an error here?
function I = simpson(f,a,b) depth 1 for i = 0:n depth 2 if i==0 || i==n depth 3 elseif mod(i,2)~=0 depth 3 elseif mod(i,...
4 days ago | 0
How do I plot a prod function in MATLAB?
syms t N ht = 2 * symprod((t-5)/4, t, 1, N) T = 1:10; y = double(subs(ht, N, T)) plot(T, y)
4 days ago | 0
i don't know code
x=[10 20 30 40 50 60 70]; That is a numeric vector. f(x)=1./(cosd(x)+2*sind(x)).^2; The right-hand side calculates a vector o...
4 days ago | 1
Coloring string, fprintf seems limited and cprintf is even a thing?
cprintf is a File Exchange contribution. You can install it using the Add-On Explorer. The return value from fprintf() is the n...
4 days ago | 0
Error: Array indices must be positive integers or logical values. implementing fletcher reeves method
fletcherreeves2([5;5],@(x) x(1)^2-x(1)*x(2)+4*x(2)^2+3*x(1)+2,@(x) [2*x(1)-x(2)+3,-x(1)+8*x(2)],10^-(6)) The third parameter th...
5 days ago | 0
Can it be possible to use a for loop to precise the code
%%% The following lines need to be in squeezed so that it will save time (using for loop) Using a for loop is only faster th...
5 days ago | 0
| accepted
Can we use standard deviation of color image as a contrast value?
That particular kind of contrast is called RMS contrast; there are other contrast measures as well. https://en.wikipedia.org/wi...
5 days ago | 0
| accepted
How can I calculate ln(x) in matlab code?
There seems to be some conception that "ln" is the "right" way to take natural logarithm, and that MATLAB is... deficient... bec...
6 days ago | 0
houw can I get the number of terms?
First realize that the sum of 2 cube + 4 cube + 6 cube and so on, is 2 cube times (1 cube + 2 cube + 3 cube +...) Now look u...
6 days ago | 0
'Unable to concatenate the table variables 'Var1' and 'Var2', because their types are cell and double.' why this error is showing?
Your file contains a mix of text and numeric. What result are you expecting when you ask to convert it to a single array?
6 days ago | 1
why plot line style not change?
you are plotting only one point at a time. plot() only draws lines when there are at least two adjacent finite coordinates in a ...
6 days ago | 1
Arrazy size problem at line 24
P= (-m)*(Acc); p=fft(P); m is a scalar and Acc has 6 elements so P has 6 elements. fft with one parameter returns someth...
6 days ago | 0
Summing over indices using symsum
You cannot use a symbolic variable as an index. I think it is unlikely that it will ever be supported to use symbolic variable...
7 days ago | 1
can we make 3D mash plot from eq y(x)
syms x theta g=9.81; v0=25; y0=1; fun = (-1)*(tand(theta)*x-(g/(2*v0^2*cosd(theta)^2)*x.^2)+y0); fsurf(fun, [0 300, 0 90]...
7 days ago | 0
Pre-built functions suddenly became undefined in app designer?
if timerfind() returns empty then it is [] that it returns rather than an empty array of class timer. And stop([]) does not work...
8 days ago | 0
make function to plot countour and 3D
f=@(X,Y) 2+X-Y+2*X.^2+2*X.*Y+Y.^2; plot3dfunc(f,-2,0,0,3) function plot3dfunc(f,Xmin,Xmax,Ymin,Ymax) x=linspace(Xmin,Xmax,5...
8 days ago | 0
| accepted