Answered
Not enough input arguments
Run this: which abs -all from a script or the Command Window, and post the results. I suspect there is another ‘abs’ functio...

4 years ago | 0

Answered
Unable to perform assignment because the left and right sides have a different number of elements.
We will likely need to have the ‘acc_g’ matrix. (It can’t be a vector, since the reference to it in the first loop is to column...

4 years ago | 1

| accepted

Answered
fprintf with cell and double values within a for loop
The code needed some tweaks. iter_names = {'One', 'Two', 'Three', 'Four'}; one = {12, 3, 5, 5}; two = {1,2,3,1}; three = {...

4 years ago | 0

Answered
Using ODE45 with sine function
‘... is there any way to write ode and plot within the same file?’ See if this produces the desired result — [tv,Yv]=o...

4 years ago | 0

Answered
How and what is the time period of following function
The stepinfo function will give essentially all the relevant information — R = 1;%Given values C = 0.01; L = 0.01; RC = R*C...

4 years ago | 0

Answered
How to separate a vector into two different vectors?
Try this — age_vec =[ 21 18 57 52 20 22 23 21.50 38 31 30 29 58 53 21.75 86 55]; Lv = age_vec > 37.5; ...

4 years ago | 1

| accepted

Answered
How do I pass input parameters when running a script within another?
Create ‘Script_A’ as a function with those inputs and specify an output value array that it will return. See the documentatio...

4 years ago | 0

Answered
Subscribing into a timetable using only the time values
Try this — sz = [120 4]; %Dimensionen of the Table varTypes = {'string','string' 'string','double'}; %Types of Variables var...

4 years ago | 0

| accepted

Answered
How to get the equation inside that of root(function,z) equation ,i.e the function only
The vpa funciton usually works — syms z Zfcn = root(z^4 - (190266216202962831605969987684001433013625*z^3)/14293443086071928...

4 years ago | 0

| accepted

Answered
How can i Calculate this with matlab?
Using the Symbolic Math Toolbox — syms m alpha = 1; L = 1; t = 0.05; x = 42; ...

4 years ago | 0

| accepted

Answered
I can't integrate symbolic expression with abs(x), and using sign(real(x)) produces wrong results
My version of MATLAB cannot run images of code. Apparently the variables have numeric values or the plot would not exist, so ...

4 years ago | 0

Answered
Problem Explicitly Defining a Plot Area
The problem is the 'Position','TightInset' name-value pair. The 'Position' property value must be a four-element vector. The '...

4 years ago | 0

| accepted

Answered
How to get the message output shown in the command window
Depending on the routine that is producing that output, it might be possible to write it to a file instead of or in addition to ...

4 years ago | 0

| accepted

Answered
zero‐padding at the end of the signals
With this assignment: y(1,250)=0; the ‘y’ vector no longer has 220 elements, it now has 250. To illustrate, this does not ...

4 years ago | 0

Answered
Use logic to determine if array contains a specific date
Use the month function, then do the comparison — x = datetime(2021,12,13); y = datetime(2021,11,13); TFx = month(x) == 12 T...

4 years ago | 0

| accepted

Answered
Numeric column not read as string with readtable on XLS file
The readtable function has no problems with that variable (that appears to be ‘History.UUT_ID’) and reads it as a double. I imp...

4 years ago | 0

Answered
EEGLAB Removing Line Noise 60Hz and its Harmonics
Try something like this — Fs = 1000; % Use Correct Sampling Frequ...

4 years ago | 0

Answered
matlab people helo hellp
It appears that anc are constants. Are they known and provided or are they to be estimated? Assuming they are provided — ...

4 years ago | 0

Answered
how to display the 3d graph for this problem?
Try it with these changes — hs = surf(X,Y,Z,'EdgeColor','none','FaceColor','flat','FaceAlpha',0.6); hs.ZData = hs.ZData-0.5; ...

4 years ago | 0

| accepted

Answered
error couldnt be rectfied for ztransform of equation
The quotes in: ZTY=subs(ZTY,{'ztrans(y(n),n,z)','y(0)','y(1)'},{Y,y0,y1}); are no longer necessary (they were a few versions ...

4 years ago | 0

| accepted

Answered
How do I get the transfer function from experimental step response data?
It is necessary to have the System Identification Toolbox for this. The appropriate procedure for estimating a state-space mo...

4 years ago | 0

Answered
how can i fit with using nonlinear regression?
There are two options — First, if it is truly a nonlinear funciton of something, developa mathematical model of the process th...

4 years ago | 1

| accepted

Answered
how to edit x axis and y axis values?
Use the Axis Properties, specifically XTickLabel, YTickLabel, and ZTickLabel to specify them. x = 1:10; y = rand(size(x)); ...

4 years ago | 1

| accepted

Answered
how can I plot frequency spectrum and impulse response with hold on?
Use freqz instead of fvtool to plot the transfer function of the filter, and specify the sampling frequency of the signal in the...

4 years ago | 0

| accepted

Answered
fzero returns "Too many input arguments"
Perhaps the order in the code is wrong. The functions must all be at the end of the script for included functions to work. T...

4 years ago | 0

| accepted

Answered
histogram of x and y data from a txt file
It seems to produce the correct result on its own! T1 = readtable('https://www.mathworks.com/matlabcentral/answers/uploaded_f...

4 years ago | 0

| accepted

Answered
How can I assign a single column of a 0x10 empty table
Preallocation for table arrays is possible. myTable = table('Size',[10 1], 'VariableNames',{'firstVariable'}, 'VariableTypes'...

4 years ago | 0

| accepted

Answered
Fitting and parameter estimation of kinetic model ODE system
Optimising 14 parameters is asking a lot of fminsearch! I switched to lsqcurvefit here because fminsearch is not likely to be u...

4 years ago | 0

| accepted

Answered
How can I plot laplace transformed functions?
It might be easier to do this outside the Symbolic Math Toolbox. That aside, try this — syms x s js rs sigma omega f = sin...

4 years ago | 0

| accepted

Answered
Feedback Function Not enough input arguments error
Please do not mix Symbolic Math Toolbox and Control System Toolbox commands. It only confuses both of them! k=0.0223; thet...

4 years ago | 0

| accepted

Load more