Respondida
How can I fix value of vector inside for loop ?
Your assignment is not quite clear but to the best understandinbg of mine. Note that repelem(A,1) if A is a scalar, the result i...

alrededor de 3 años hace | 1

| aceptada

Respondida
all ODE function returns NaN
There are two ways to address this issue. (1) Let ode15s to select appropriate step size; (2) make the step size much smaller th...

alrededor de 3 años hace | 0

Respondida
Solving for Zeros Across a Range
There is an err in the loop in i = linspace(1,I) leads to non integer value that is NOT acceptable for an index. Here is a corre...

alrededor de 3 años hace | 0

Respondida
How to save the scatter plot with and without transparency
Use exportgraphics() and also, note where the set() command for figure a and b is used and where exportgraphics() is used, e.g.:...

alrededor de 3 años hace | 0

Respondida
Exported Regression Model is outputting NaN's when given new data.
There is one crtical point that is in the input data for the support vector machine regression model the input data needs to be ...

alrededor de 3 años hace | 0

| aceptada

Respondida
Recovering shape of periodically sampled signal in near resonance conditions
As understood your question correctly, is that you are trying to get the shape function which is the envelope thata can be compu...

alrededor de 3 años hace | 0

Respondida
Recovering shape of periodically sampled signal in near resonance conditions
There are several fucntions of MATLAB which can be used in such exercises. They are interp1(), interp2, interpn,pchip, spline, g...

alrededor de 3 años hace | 0

Respondida
Assign a row vector to a row of an array using logical indexing to omit certain values
As you stated that Q and G are zero matrices generated for memoty allocation if so, and you want to to fill out the values of Q ...

alrededor de 3 años hace | 0

Respondida
Modeling using 6 differential equation and a constraint?
The problem is with this [ ] assigning step in your code: v = [ ]; What is the purpose of diving a number by an empty variable...

alrededor de 3 años hace | 0

Respondida
how to use elements from array to sort data
Here is the corrected code: numdata=readmatrix("res Data.xlsx"); Q = numdata(1:5, :)'; F = numdata(6:10, :)';

alrededor de 3 años hace | 1

Respondida
How to calculate 95% confidence interval using regression analysis?
If there is a linear fit model for x vs. y(x), then fitlm() can be used, e.g.: x = (0:.1:13)'; Noise = 35*randn(size(x)); y =...

alrededor de 3 años hace | 0

| aceptada

Respondida
Solving matrix differential equation
It looks likse sizes F1 and F2 are coherent with R1 and R2. The only question in your given exercise is R1' and R2' are transpo...

alrededor de 3 años hace | 0

Respondida
Magitude from a three phase signal
Here is how to perform FFT and compute the phase angle values in rad: data = readmatrix('D_Sample.xlsx'); % Sample data im...

alrededor de 3 años hace | 0

| aceptada

Respondida
Magitude from a three phase signal
Simulink -> Simscape toolbox, there is a block to compute magnitude and angle calculation: Calculate the magnitude and phase of...

más de 3 años hace | 0

Respondida
Grouping Categories in Scatter Plot
If understood your question correctly, here is one example how to address this issue: DATA = randi(100, 25, 1); BIN = discreti...

más de 3 años hace | 0

Respondida
What is the difference between "any" and "all" function?
There is one significant difference between any() and all(). Here are definitions: (1) any() - any True if any element of a ...

más de 3 años hace | 1

Respondida
why Code generations of 1D and 2D lookup are same ?
In case, you are using Simulink, use block 1D or 2D lookup table blocks: https://www.mathworks.com/help/simulink/lookup-table...

más de 3 años hace | 0

| aceptada

Respondida
Generation of basic signals
In MATLAB and Simulink, there are few built in functions to generate, such signals as unit step, impulse, unit ramp, sine wave o...

más de 3 años hace | 1

Respondida
Matlab Transfer function multiple single s terms
Here it is: C1 = 0.000000000150; C2 = 0.000000000470; R1 = 10000; R2 = 180000; R3 = 2700; R4 = 56000; G = (R3+R4)/R3; ...

más de 3 años hace | 0

| aceptada

Respondida
How to generate model output given a transfer function and input signal
use tfestimate() - here is documentation how to use it: https://www.mathworks.com/help/ident/ref/tfest.html#btkf8hm-2

más de 3 años hace | 0

Respondida
help with Plot a Parametric Equation
Here is a simple example code to get it done: N = 1e4; p = linspace(0,1); Na = linspace(1, 1e4); Nb = linspace(1, 6e3); Nc ...

más de 3 años hace | 0

| aceptada

Respondida
How to find x,y coordinates.
(1) Using the data to be plotted y = @(t)2*t.^2+3*t-5; t = 0:2:8; f = y(t); tnew = 0:.2:8; y = interp1(t, f, tnew); figure...

más de 3 años hace | 0

| aceptada

Respondida
change color of bar plot
Here is one example how to get such bar chart: y = [12 22 23; 21 25 26; 24 18 19; 22 17 15]; bar(y,'stacked') legend({'Set # ...

más de 3 años hace | 1

Respondida
timer doesn't work
Here is how it can be attained: Tspan = 240; % Time span 240 seconds t = timer('TimerFcn', 'stat=false; disp(''Timer!'')', 'S...

más de 3 años hace | 0

Respondida
How to get .m file definition programmatically?
It is possible differentiate .m and .mlx files by referring to their file extensions or simlarly, Simulink's .mdl and .slx or sl...

más de 3 años hace | 1

Respondida
timer doesn't work
Here it shows that it is working. An alternative way is to use [tic .. toc] to count time if this is the objective: Tspan = 10;...

más de 3 años hace | 0

Respondida
Removing numerical data from txt file
Here is the solution to keep the time of data collected in the external file: unzip('https://www.mathworks.com/matlabcentral/an...

más de 3 años hace | 0

Respondida
MATLAB is not deleting requested values.
Here is one example that shows it works: D = readmatrix('Data2.xlsx', 'Sheet', 1) % All imported D(1:2,:)=[] ...

más de 3 años hace | 0

| aceptada

Respondida
How I can find intersection point of direction vector and one of the given plane of 3d cube
Have reviewed this solution: https://www.mathworks.com/matlabcentral/answers/93623-how-do-i-plot-the-line-of-intersection-betwee...

más de 3 años hace | 0

Respondida
Not able to run
Here is the corrected code (Note that the Initial Conditions were missing and some arbitrary values are taken. Therefore they ne...

más de 3 años hace | 0

Cargar más