Answered
hi,when ℹ trying to intergal F ,a error occur [Error using integral, the first input parameter must be a function handle]
Try this: F(i)=integral(@(x)(fi(x).*f(x)),0,1); Everything is the same, except that integral now has the function handle it w...

6 years ago | 0

Answered
How I can express a function in terms of another argument?
I may be missing something, however it appears that is essentially , so use that transformation. Divide everything by and exp...

6 years ago | 1

| accepted

Answered
How can I have the title on a graph change depending on whats in the graph?
Use sprintf in the title. Example — x = 1:0.1:5; for k = 1:5 y = x.^k; figure plot(x, y) title(sprintf...

6 years ago | 0

Answered
Error by using xline function
The xline function was introduced in R2018b. Try this: figure plot((0:8), rand(1,9)) hold on plot([1 1]*5, ylim, '-r') ...

6 years ago | 0

| accepted

Answered
the use of ezplot function
You need to use the (-) sign, not char(8211) for the minus sign. Also, character arrays are no longer usable with the Symboli...

6 years ago | 0

Answered
Error when trying to remove rows with specific values from cell array.
Try this: CA = num2cell(randi(50, 25, 5)); % Create Cell Array idx = cellfun(@(x)ismember(x, 1:20)...

6 years ago | 0

| accepted

Answered
solving algebraic equations and characteristic vectors
The term MATLAB uses here is ‘character’, not ‘characteristic’. A character vector is a vector make up of ASCII characters de...

6 years ago | 0

Answered
Plot date on x axis
The datetick call needs to go after the plot call: t=1:1:48; plot(t,Atlanta(:,8)) hold on dateFormat = 19; datetick('x',...

6 years ago | 0

| accepted

Answered
Fit Damping Coefficient from Acceleration Samples
It depends on how you want to approach this. If you have the data and want to fit it to an equation to estimate the parameter...

6 years ago | 0

| accepted

Answered
Calculate confidence interval for gamma function
I am not certain what you are permitted to use. I would use fitdist then paramci. With respect to assuming a distribution of t...

6 years ago | 1

| accepted

Answered
Help me with this
MATLAB is case-sensitive. Try this: T1 = readtable('rfilename.xlsx' ,'C1:C8761') Note that ‘Readtable’ does not exist, how...

6 years ago | 0

Answered
How to divide a voice signal into 20 ms blocks with a 10ms shift ?
I have no idea what you want to do from the description you provided, however the Signal Ptocessing Toolbox buffer function will...

6 years ago | 0

| accepted

Answered
Dynamic model for Steel purification in AOD converter
The problem with this assignment (and the others like it): XbFe=zeros(1,i); is that ‘i’ needs to be defined as a scalar doubl...

6 years ago | 0

| accepted

Answered
reading the contents of a text file
Since you have R2019b, use the readmatrix function. Another option is readtable if it has headers you want to preserve. If i...

6 years ago | 0

| accepted

Answered
Undefined function 'resample' for input arguments of type 'double'.
There are several resample functions. Be sure that you are using the Signal Processing Toolbox resample function. (It is neces...

6 years ago | 1

Answered
why does EZplot work but not fplot
I recall seeing that problem earlier. First, be certain that you have installed the latest MATLAB Update for R2019a. Secon...

6 years ago | 0

Answered
Marker Symbol 'I' in plot
You can use a text object as a work-around: x = 1:50; y = rand(size(x)); figure plot(x, y, '.', 'Color','none') axis([0 ...

6 years ago | 1

| accepted

Answered
Using ode45 on a symbolic to numeric function
The situations in which I begin with symbolic expressions for differential equations are generally higher-order and nonlinear. ...

6 years ago | 0

| accepted

Answered
Matlab piecewise function tranformation to step and ramp
Experiment with these: u = @(t) t>0; % Unit Step Function r = @(t,a,b) (t.*a).*((t>=0) & (t...

6 years ago | 0

Answered
Keep getting 'Error in odearguments (line 90)' and 'Error in ode45 (line 115)'
Use the anonymous function function handle representation to call ‘Torque_Velocity_Function’ in your ode45 call: [t,x] = ode45...

6 years ago | 0

| accepted

Answered
Full Width at Half Max Peaks
You have not posted the release you are using, however the Signal Processing Toolbox findpeaks function will return the FWHM for...

6 years ago | 0

Answered
Fiting for normalized histrogram.
Divide the ‘Bar’ object and the ‘Line’ object by thier maximum values: figure hfh = histfit(x); hfh(1).YData = hfh(1).YData/...

6 years ago | 0

Answered
Create a transfer function that looks like a polynomial
Since it is a ‘static gain’ object, it acts just like a simple amplifier. It has no frequency-dependent characteristics, so it ...

6 years ago | 0

Answered
Damped cosine features in a exponential decay
This produces a reasonable approximation, however the signal appears to be changing its frequency toward the end: D = load('Am...

6 years ago | 0

| accepted

Answered
Determine indices of how many times (x,y) coordinates occur in 2d vector
Try this: M = randi(5, 25, 2); % Create ‘La...

6 years ago | 0

| accepted

Answered
Most common pair in a matrix.
Try this: M = randi(5, 25, 2); % Create ‘LatLon’ Data [Mu,~,idx] =...

6 years ago | 0

| accepted

Answered
Array indices must be positive integers or logical values.
The problem is: err2 = ((Vmp+(Rs*Imp))/(Ig-Imp-Isat((exp(1)*(q*(Vmp+(Rs*Imp))/n*k*T)-1))))- Rsh; ...

6 years ago | 0

| accepted

Answered
How can I remove negative values from vector (Half-Wave Rectification)
Try this: t = linspace(0, 6*pi, 1E+5); s = sin(t); idx = s >= 0; % Conditional Logical Index...

6 years ago | 0

Answered
how to curve fit to find a value
One approach: R = 0.6; C = 270E-12; V = 100E3; w = @(L) sqrt((1/(L.*C))-(R./(2.*L))^2); objfcn = @(L,t) (V./(w(L).*L)).*...

6 years ago | 0

| accepted

Answered
How to calculate passband and stopband coefficients for signal filtering?
If you are concerned with an anti-aliasing filter for the time-domain signal, you need to go back and design a hardware Bessel (...

6 years ago | 1

| accepted

Load more