Beantwortet
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...

etwa 3 Jahre vor | 1

| akzeptiert

Beantwortet
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...

etwa 3 Jahre vor | 0

Beantwortet
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...

etwa 3 Jahre vor | 0

Beantwortet
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.:...

etwa 3 Jahre vor | 0

Beantwortet
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 ...

etwa 3 Jahre vor | 0

| akzeptiert

Beantwortet
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...

etwa 3 Jahre vor | 0

Beantwortet
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...

etwa 3 Jahre vor | 0

Beantwortet
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 ...

etwa 3 Jahre vor | 0

Beantwortet
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...

etwa 3 Jahre vor | 0

Beantwortet
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, :)';

etwa 3 Jahre vor | 1

Beantwortet
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 =...

etwa 3 Jahre vor | 0

| akzeptiert

Beantwortet
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...

etwa 3 Jahre vor | 0

Beantwortet
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...

etwa 3 Jahre vor | 0

| akzeptiert

Beantwortet
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...

etwa 3 Jahre vor | 0

Beantwortet
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...

etwa 3 Jahre vor | 0

Beantwortet
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 ...

etwa 3 Jahre vor | 1

Beantwortet
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...

etwa 3 Jahre vor | 0

| akzeptiert

Beantwortet
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...

etwa 3 Jahre vor | 1

Beantwortet
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; ...

etwa 3 Jahre vor | 0

| akzeptiert

Beantwortet
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

etwa 3 Jahre vor | 0

Beantwortet
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 ...

etwa 3 Jahre vor | 0

| akzeptiert

Beantwortet
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...

etwa 3 Jahre vor | 0

| akzeptiert

Beantwortet
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 # ...

etwa 3 Jahre vor | 1

Beantwortet
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...

etwa 3 Jahre vor | 0

Beantwortet
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...

etwa 3 Jahre vor | 1

Beantwortet
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;...

etwa 3 Jahre vor | 0

Beantwortet
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...

etwa 3 Jahre vor | 0

Beantwortet
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,:)=[] ...

etwa 3 Jahre vor | 0

| akzeptiert

Beantwortet
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...

etwa 3 Jahre vor | 0

Beantwortet
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...

etwa 3 Jahre vor | 0

Mehr laden