Réponse apportée
Spectral Entropy vs Frequency
using fft (Fast Fourier Transform). I'll give you an example. suppose you have a discrete signal called "x[n]" that has been sa...

plus de 4 ans il y a | 0

Réponse apportée
Sending/calling every row of matrix to another function from current function
[N,~] = size(TruncatedSubstring); % N = number of rows for i=1:N substring = TruncatedSubstring(i,:) Result(i,:) = ...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
textscan format string for hours:minutes
this works for me. I'm using 2016a. txt = '00:01'; result = textscan(txt, '%{mm:ss}D') result = [00:01] if you can't d...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
Solving system of equations
you must first define the unknowns in your system of equations. it seems you have 12 equations and therefore you must have 12 un...

plus de 4 ans il y a | 1

Réponse apportée
Importing a signed integer value with a space
if your data are all positive, then you can ignore plus sign. and your data is not integer use single or double precion. here's ...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
Smooth data to get the best approximation.
I used curve fitting app you can workaround and change settings to get your result.

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
Directly converting uint16 image sequence to .avi video file
it seems the function does not support uint16, but it accepts images of type single and double precision. convert your image fra...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
How to generate random smooth 2D closed curves/shapes
If you are familiar with bezier curve, you can do it easily by setting random values for points coordinates.

plus de 4 ans il y a | 1

Réponse apportée
How to import part of the data from multiple .txt files into the MATLAB workspace as a variable
fileID = fopen('685_FM01_HF_7-21-2020.txt'); % open first text file c1 = textscan(fileID,'%f %f','Delimiter',','); % scan it ...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
Plotting 3D grating
I think this is what you're looking for x = [1 2 2 3 3 4 4 5 5 6]; z = [0 0 1 1 0 0 1 1 0 0]; y = [1 4]; [X,Y] = meshgrid(x,...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
Models based on singular value decomposion
load your dataset from your excel file using this command: "A = csvread(filename)". then you can do anything and ofcourse matl...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
Fading/shading an image
A = imread('lena.bmp'); % read rgb image named 'lena.bmo' figure(1);imshow(A) % show the original image in figure1 dim = l...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
How to determine the two closest values to a threshold value
%% nearest value considerin it is bigger or smaller than threshold m1 = min(y(y>0.9)) % nearest value after threshold m2 = max...

plus de 4 ans il y a | 2

| A accepté

Réponse apportée
How to copy cell data to a matrix?
the problem is with the date/time format which contains ":" and "-'. if you need matrix you can simply avoid these. c=''; file...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
How to get a solid circle encircled by another circle and solid circle encircled by a square
x = 1; y =2; figure(1) plot(x,y,'o','MarkerSize',20) hold on plot(x,y,'o','MarkerFaceColor', 'k') figure(2) plot(x,y,'s'...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
atan2(0,0) is not undefined (NaN)
it is not a bug. although in analytic math it is undefined, the trigonometric functions are usually calculated by their taylor s...

plus de 4 ans il y a | 0

Réponse apportée
for loop for matrix
x = [1, 2, 5] y = [0.1, 0.5, 10] z = [10 20; 30 40] X = repmat(x,[4 1]) Y = repmat(y,[4 1]) Z = repmat(z(:),[1 3]...

plus de 4 ans il y a | 1

Réponse apportée
Extracting matrix from mat file
I assume you have an "x" and a "y" rectangular grid point coordinates, and "A" contains "f(x,y)" data. in this case "x" is a row...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
y1=(t1==0)
if "t1" is a vector like this: t1 = [-2 -1 0 +1 +2] then "t1==0" is a vector of same size which replaces any non-zero value by...

plus de 4 ans il y a | 0

Réponse apportée
Add values to the i-th position of a table/double
if you are trying to insert xsim1 between x(i) and x(i+1) without any data loss, write this code: x = [x(1:i), xsim, x(i+1:end)...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
How to define function
function y = f(x) y = zeros(size(x)); y(abs(x) < 1) = 1; end

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
Please help me understand whether I have set up a loop and performed an RMSE (Root Mean Square Error) calculation correctly
is this way more efficient? freq = 1; T = 1/freq; w = 2*pi*freq; a = [1 1/2]; % harmonic amplitudes y = @(t) a(1)*sin(w*t...

plus de 4 ans il y a | 0

Réponse apportée
Solve a system of two differential equations
generally in order to solve a system of ode s; you must first define your equation in the form of (Xdot = f(X,U)). "U" is the i...

plus de 4 ans il y a | 0

Réponse apportée
data import from mat file
instead of a_1 ,a_2,..., define a vector "a" where its elements a(1), a(2), ... are your input argument. your function should lo...

plus de 4 ans il y a | 0

Réponse apportée
A simple problem about matrix plz HELP me
suppose your matrix is called "X". if you want to scale each row by a known factor, write this code: % define a column vector c...

plus de 4 ans il y a | 0

| A accepté

Réponse apportée
symbolic toolbox problem ?
by default matlab vpa uses 32 digits. old = digits(4) vpa(pi) old = 32 ans = 3.142 old = digits(9) vpa...

plus de 4 ans il y a | 0

Réponse apportée
integration not giving a numerical answer?
vpa(I) ans = 13.475706197048467507041153147166

plus de 4 ans il y a | 1

| A accepté

Réponse apportée
Solve 2 equations with two unknowns and an array
you are using symbolic toolbox. I recommend to make a function file looking like this: function y=eq(x) % enter equations % t...

plus de 4 ans il y a | 0

Réponse apportée
Simulink : Define signal label of output ports = outport names ?
just use "goto" and "from" blocks and then connect them to a bus creator. double click the line connecting "from" block to "bus ...

plus de 4 ans il y a | 0

Réponse apportée
I need help solving a system of differential equations. The equations are given below, in matrix form. The problem that I'm having is regarding the fact that I have time dependant elements in the matrices.
if you are solving a circuit with time-variant capacitors then your state equations are no longer in "Xdot=A*x+B*U", and they ar...

plus de 4 ans il y a | 0

Charger plus