Answered
Possibly a bug in the ASSUME function (Symbolic Math Toolbox)
This is documented in the Tips section of assume() function: https://www.mathworks.com/help/releases/R2020b/symbolic/assume.html...

5 years ago | 1

| accepted

Answered
Check and read different types of file types.
I am not sure about .ods, but MATLAB's readmatrix() is capable of importing .csv and .xls file. You don't need to tell MATLAB th...

5 years ago | 0

| accepted

Answered
readmatrix "not enough input arguments"
You have defined a function name replace() placed on path C:\...\Thesis\emi-matlab-master\EMI_Calibration\replace.m which is s...

5 years ago | 0

| accepted

Answered
Save figure handle globally in Simulink
That is not the current way to update handles from Simulink. I am not sure if it is even possible. Even if it is possible, it wi...

5 years ago | 0

| accepted

Answered
Remove consecutive duplicates from matrix
Try this A=[ 1, 0, 3 2, 1, 3 2, 1, 3 2, 2, 3 1, 0, 3]; idx = find(~any(diff(A), 2))+1; A(idx, :) = [];

5 years ago | 1

| accepted

Answered
Converting a human-readable txt file to machine-readable
Following loads the values again as numeric form str = fileread('HourlyBirkenesOzone.txt'); values = regexp(str, '(\d+\.\d+)',...

5 years ago | 0

Answered
Taking sample from audioread
audioread() needs to read complete audio file. You can get 200 samples after the file is loaded [y, fs] = audioread(filename); ...

5 years ago | 1

| accepted

Answered
Solution of 1 equation with 2 unknown variables
A single equation with two variable can have an infinite number of solutions. You need to fix atleast one value. For example y ...

5 years ago | 1

| accepted

Answered
Not enough input arguments
In MATLAB, a vector is consider a single input. If you want to pass you input as vector then change your function like this fun...

5 years ago | 0

| accepted

Answered
How can I input equations with multiple variables?
evak is evil: https://www.mathworks.com/matlabcentral/answers/304528-tutorial-why-variables-should-not-be-named-dynamically-eval...

5 years ago | 1

| accepted

Answered
Does one rename variable names after reading data?
Although possible, creating variable names like variable1, variable2, ... is not a good coding practice: https://www.mathworks.c...

5 years ago | 0

| accepted

Answered
Piecewise to Heaviside problem
Yes, your code is correct. Following will work t = 0:0.01:10; y = (t.^2-1).*[heaviside(t)-heaviside(t-2)]+(2.*t-3).*[heaviside...

5 years ago | 0

| accepted

Answered
Loop to Organize Matrices
Naming variables like Col1, Col2, ... is a very bad coding practice: https://www.mathworks.com/matlabcentral/answers/304528-tuto...

5 years ago | 0

| accepted

Answered
Printing equations stored in a cell to plot titles?
Although you can use func2str() to convert the function handle to char array sgtitle(sprintf(formatspec, func2str(q_array{k})))...

5 years ago | 0

| accepted

Answered
How to know which plot is more linear then the other?
You can see the residual error with linear fit to see which dataset is more linear [~, eA] = polyfit(1:numel(A), A, 1) [~, eB]...

5 years ago | 0

| accepted

Answered
Plots Limits in Matlab
You need to set xdir property to 'reverse' xlim([-1 1]) set(gca, 'xdir', 'reverse')

5 years ago | 1

| accepted

Answered
I am a beginner, can anyone please help me writing a code for this equation to find 'x' using iteration
You can use fzero() eq = @(x) gamma(1+2./x)./gamma(1+1./x).^2 - 1 - (4.56/40)^2; x0 = 10; sol = fzero(eq, x0) Result >> sol...

5 years ago | 0

Answered
Using fsolve in a loop with 2 unknown scalars to solve for each iteration
That's because fsolve() returns two elements, y(i) can only hold a single element. You can create a matrix where each row store ...

5 years ago | 0

| accepted

Answered
How do I call the elements in an array to be counted?
You can do it without loop count = find(sumCheck>9, 1) - 1;

5 years ago | 0

Answered
linear fit for dates that do not have data
See fillmissing(): https://www.mathworks.com/help/matlab/ref/fillmissing.html. You can use the linear method to fill the values....

5 years ago | 0

| accepted

Answered
Motion-Based Multiple Object Tracking video ?
You might not have installed the computer vision toolbox. What is the output of ver vision If it shows a warning, it means tha...

5 years ago | 0

| accepted

Answered
match elements of a matrix to an array
A much easier solution is to use interp1() with 'nearest' option xxx = interp1(B(:,1), B(:,2), A, 'nearest')

5 years ago | 1

| accepted

Answered
How can I read image files with specific filename pattern out from folder with subfolders using imagedatastore?
You can also pass paths to the required files location = 'C:\Users\CCS\Desktop\spproject\**\P-*.jpg'; % ** will match all the s...

5 years ago | 0

| accepted

Answered
Higher Order (6X6) Matrix Inverse with Variables
You need symbolic toolbox for that. For example A = randi(10, 6); syms S H = S.*eye(6)-A; H_inv = inv(H)

5 years ago | 0

| accepted

Answered
Script not working in correct way
There might be some problem with the way you wrote the formula. You are getting same value as D because the term >> exp(-2*d*sq...

5 years ago | 0

Answered
Input variable name in a for loop
Stephen already suggested the correct way. For your current code, a quick fix is to define a cell array C = {w1, w2, w3, w4, w5...

5 years ago | 0

Answered
Multiple Figures from Functions
In the function, you will have statements like figure(n); % n can be any number Replace it with figure()

5 years ago | 0

Answered
Removing certain values from columns in a matrix
Try this A = [ 21 4.51076 21 48.3399 19 11.4743 21 36.6765 22 18.3587 23 19.7070 21 59.0842 ...

5 years ago | 0

| accepted

Answered
should I change the learning rate of adam in deep learning toolbox by myself? When I use adam, Learning rate schedule is shown as Constant.
No, by default, it will use constant step-size. You will need to use trainingoptions struct(): https://www.mathworks.com/help/de...

5 years ago | 0

Answered
Is it overflow?how can I input 2.5e-6?
This happens because of the way MATLAB parses the expression vpa(2.5e-6). First, MATLAB converts 2.5e-6 into a double datatype, ...

5 years ago | 1

Load more