Answered
Simulation Domain (Region)?
I never heard of it either. It would help to know the context. The only reference I found is 3.1.1 Defining a Simulation Dom...

6 years ago | 0

Answered
How to find the index of the center element in a 2d array if all the elements are the same?
If all the elements are the same, one approach is: x = -1*ones(5,5); [r,c] = ind2sub(size(x), ceil(numel(x)/2)) Thsi will on...

6 years ago | 0

| accepted

Answered
Modifying my fprintf code.
Replace the ‘n’ in ‘pi/n’ with the appropriate format descriptor. I chose ‘%d’ here, then concatenate the ‘n’ vector with the ‘...

6 years ago | 1

| accepted

Answered
Why is 'print' creating a csv file?
Perhaps because you’re telling it to? Running these lines: filetoopen = '400kbps_10db_0,096k_spectrum.CSV'; filenamecomma ...

6 years ago | 1

| accepted

Answered
How to fourier transform a gaussian curve?
The ‘x_fit_fcn’ is not syntax that MATLAB recognises (except in the Symbolic Math Toolbox), as a function. Try this versiion ...

6 years ago | 0

| accepted

Answered
Array indices must be positive integers or logical values.
Whatever ‘charpath’ was originally (array? function?) is now over the horizon so we cannot see it. This line: charpath = L/...

6 years ago | 0

Answered
Solving series differential equation use ode45
Yes! The problem is: y0=[0;0;0]; so: sin(y(1))/y(3) will be NaN because sin(0)=0, and 0/0 (and Inf/Inf) result in NaN v...

6 years ago | 0

| accepted

Answered
Cosinor analysis of temperature Excel data
One approach: D = readtable('vital_parameters_15540 (1) copy.xlsx'); x = datenum(D.time) - datenum(D.time(1)); ...

6 years ago | 0

| accepted

Answered
Plot magnitude of reflection coefficient in linear and db scale, vswr
Use the linspace function to create the ‘f’ vector: C=8.34E-12; L=15E-9; zo=50; zin=50+((1/1i*C)+1i*L); f=linspace(200E...

6 years ago | 0

| accepted

Answered
how to convert date to numbers
I showed you how to read them and do other operations on them in: How to combine date and time. That also converts them to da...

6 years ago | 0

| accepted

Answered
integrate a partial area under a plotted curve
To get the area, add these lines to your code: [TF,Q0] = ischange(ifuse, 'linear', 'Threshold', 1.5E+6); [vl,vli] = min(ifuse...

6 years ago | 1

| accepted

Answered
how to find duration of peak; starting and ending points
Experiment with ths ischange function, and if you have the Signal Processing Toolbox, the findchangepts function.

7 years ago | 0

| accepted

Answered
Change color of graph at a certain value (temperature vs. time)
This eliminates the connections between the ‘gaps’ in the red and blue areas: D = load('Lade.mat'); Lade = D.Lade; Q1 = Lade...

7 years ago | 0

Answered
Obtain single equation from a system of equations stored as an anonymous function
Not directly. I would do this: F = @(x) [x(1).*x(2).^2 + sin(x(2)) ; ... cos(x(1)) + x(2).^3 ] ; z = [2 6];...

7 years ago | 1

| accepted

Answered
Error using @regress fuction
Try this: func = @(Q)regress(Q,X); then call it as: [b,bint] = func(Change1.ReturnsCleaned); (It seems a bit inefficient...

7 years ago | 0

| accepted

Answered
MATLAB: solving a 2nd order ODE which has a parameter which evolves in time
Try this: syms k(t) y(t) % Declare ‘k(t)’ Here [System,Subs] = odeToVectorField(...

7 years ago | 0

| accepted

Answered
Overlap of 2 logicals
Since ‘B’ and ‘B2’ have not yeat appeared, try this with synthetic versions of them: B = randi([0 1], 5, 6) > 0 B2 = randi([0...

7 years ago | 0

| accepted

Answered
How to make plot more visible in matlab
See the plot documentation section on Specify Line Width, Marker Size, and Marker Color. That should get you started.

7 years ago | 0

Answered
Solve a second-order differential equation with constant parameters changing through an external parameter
It appears that what you want to do is to pass your data to your ODE function ‘fx’. See the documentation section on Passing Ex...

7 years ago | 2

| accepted

Answered
getting z transform in factored form?using Matlab?
Control System Toolbox: z = tf('z'); H = (4*z^2 + 3*z + 9) / (4*z^2 + 3*z - 4); zsys = zpk(H); Z = [zsys.Z{:}] P = [zsys.P...

7 years ago | 0

Answered
How do I use the "omitnan' option for the Mean function when calling the function using the splitapply function?
One option: splitapply(@(x)mean(x,'omitnan'),MyArray,G)

7 years ago | 3

| accepted

Answered
Print figure without its title
One option is to keep the title in the figure call. See Specify Figure Title for an example. Another option is: title('Ran...

7 years ago | 1

Answered
plotting a polinomial fraction over a strict range
I do not have the DSP System Toolbox, so I do not have tfplot. Try this instead: q=[1 1]; d=[1 1 1]; x=0:0.001:3; trf ...

7 years ago | 0

| accepted

Answered
Finding points with same y-value on a graph.
Try this: x = [2,4,7,9,10,14]; y = [5,10,15,14,12,3]; new_y_value = 12.5 [~,idx] = max(y); newx(1) = interp1(y(1:idx), x(...

7 years ago | 0

Answered
I want to do the correlation of the following two plots
Going back to using my code (because it is easier to work with): Ts=1/200e6; t=Ts:Ts:0.00005; y=[ones(1,2000) zeros(1,8000...

7 years ago | 1

| accepted

Answered
system of 3 equation with 3 unknown, with two 2nd order equation
The resuillts are strictly numerical (not containing symbolic variables), so use vpasolve instead of solve: syms QV3 QV2 QVl ...

7 years ago | 0

| accepted

Answered
how to solve this complex equation in matlab?
Try this: syms theta gama Eqn = exp(pi/4*i)*(5+15i)+exp(i*theta)*(25+5i) == 40+exp(i*gama)*(-10+20i); [theta,gama] = vpasol...

7 years ago | 1

| accepted

Answered
removing all rows with duplicate information in two columns
Try this: a=[1 2 3 4 5; 1 3 4 5 6; 1 2 3 5 5]; [~,~,idx] = unique(a(:,[1 5]),'rows'); tally = accumarray(idx,(1:numel(idx))....

7 years ago | 0

| accepted

Answered
How to delete a whole table in the matlab?
tablename = [];

7 years ago | 3

| accepted

Answered
How can I separate the arrays when making a table?
Try this: n = 5; A = rand(n,1); B = rand(n,5); T = array2table([A, B]) That should do what you want.

7 years ago | 1

| accepted

Load more