Answered
Create an input array from -1*pi to 1*pi
% Create an input array from -1*pi to 1*pi t=-pi:pi; % Calculate |sin(t)| x=abs(sin(t)); %plot result plot(t,x);

4 years ago | 0

Answered
Hello, I need a code that gets the local minimum of a histogram by using for loops.
Initialize to index 1. Initialize to "potentially in a local minima" If you are potentially in a local minima, check to see if...

4 years ago | 0

Answered
Fitting data with custom equation and custom interval
The fundamental problem is that you have an expression raised to a negative power, and if that expression can ever be 0, that gi...

4 years ago | 0

| accepted

Answered
i have error in this code while using ode45
[250 :0 350] Your vector of initial conditions only has one entry. Your line of code will not be interpreted as [250, :0, 35...

4 years ago | 0

| accepted

Answered
dynamic time warp matlab economic data
Signal processing toolbox, dtw

4 years ago | 0

Answered
Trying to code from Polymath
Use the symbolic toolbox. Move all of the initializations of constants first. Then syms cc cp ca co and convert each of thos...

4 years ago | 0

| accepted

Answered
Write in an opened excel file using MATLAB
You can put together the reading logic from https://www.mathworks.com/matlabcentral/fileexchange/22365-function-for-faster-data-...

4 years ago | 0

Answered
How to write code for flowchart
period = 40e-6; for REPEATS = 1 : 500 %box 1, 40 microsecond interrupt last_event_time = tic; while toc(last_...

4 years ago | 0

Answered
Error using freqz, 6 columns needed to be a valid SOS matrix
Your recording of your friend is probably stereo. Your code assumes mono.

4 years ago | 0

Answered
How do i generate a user-defined function that computes Taylor series implementation of e*
The derivative of exp(x) is exp(x) so you do not need to any real work for the derivative parts. You just have to work with the ...

4 years ago | 0

| accepted

Answered
I tried to do Monte Carlo simulation in MATLAB, but it cannot be run! Can anyone help me?
You define a function but do not invoke the function. The function does not have access to any of the variables you define be...

4 years ago | 0

Answered
I tried to show effect of uncertain parameters on bi-variate function with color map and aslo highlight changes to max and min,I am not sure the function I wrote is right!!!
y=lhsnorm(50,10,10,"on"); [xmin,fval]=fminsearch(@(x)Z(x,y),x0,options) %min The y referred to there is being "captured" fr...

4 years ago | 0

| accepted

Answered
synonyms functions for uigetfile or uiopen
You can use uigetfile() with 'multiselect', 'on' . The first output of uigetfile() will be numeric if the user cancelled. The...

4 years ago | 0

| accepted

Answered
how do I know if a vector is equal to any of vectors in matrix?
transpose mem_mat and use ismember with the 'rows' option.

4 years ago | 0

Answered
İnvisible plots and a error
clear; clc; y0=3; x0=1:5; for i=1:5 l(i)=sqrt(x0(i)^2+y0.^2); Q(i)= atan(y0/x0(i)); end figure(1) plot(x0...

4 years ago | 0

| accepted

Answered
Why do I receive Arrays have incompatible sizes for this operation
You have an if that is then followed by a comparison not by an assignment. Level_Either_Side == [Level_Either_Side Sor...

4 years ago | 0

Answered
How can I extract rows using column values?
classes_needed = [49, 55, 11, 32, 13, 29, 30, 20, 33, 43, 24]; mask = ismember(emnist(:,1), classes_needed); subset = emni...

4 years ago | 2

| accepted

Answered
Find x-value of cfit function.
See John's solution at https://www.mathworks.com/matlabcentral/answers/320275-finding-values-from-cubicinterp-fit#answer_250485 ...

4 years ago | 1

| accepted

Answered
How can I plot a similar graph like below in MATLAB using txt file
data = readmatrix('test1.txt'); plot(data(:,1), data(:,2:4)); legend({'Fx [kN]', 'Fy[kN]', 'Fz [kN]'})

4 years ago | 0

| accepted

Answered
Plot graph in App Designer
Change plot(app.UIAxes,gain,f); to bodeplot(app.UIAxes, gain, {0,f} );

4 years ago | 0

| accepted

Answered
How To Write a Long-Decimal Number Data With Fprintf?
kode_annual = string(transpose(annual_equation)); change that to kode_annual = compose("%.10g", annual_equation); It is impor...

4 years ago | 0

| accepted

Answered
How to export plot with multiple axes.
I would suggest that you create a uipanel(), and parent the axes to the uipanel, and then exportgraphics() the uipanel. Or, exp...

4 years ago | 1

Answered
Index value for button group
https://www.mathworks.com/help/matlab/ref/uibuttongroup.html#mw_64460ebb-84cc-4b21-8e3c-1da7ae15c44d SelectedObject for a uib...

4 years ago | 0

| accepted

Answered
i have an error in imshow
There are three possibilities: * you might have a corrupted MATLAB installation * you might have a file named Image.m on you...

4 years ago | 0

Answered
Second plot accidently with legends from first plot
cla can be used. But a lot of a time, you just hold off and let it reset itself. When I look at your plot, I wonder if you ...

4 years ago | 0

Answered
Scatter plot with different colours,
[~, basenames] = fileparts(FileNames); First4 = cellfun(@(S) S(1:4), basenames, 'uniform', 0); G = findgroups(First4); nG = m...

4 years ago | 0

| accepted

Answered
HOW TO FIND THE TEMPERATURE VALUE IN THE THERMAL CAMERA IMAGE?
See https://www.mathworks.com/matlabcentral/answers/1723490-how-do-i-map-grayscale-values-to-get-temperature#comment_2169050

4 years ago | 0

Answered
Algorithm conversion to Matlab Code
https://people.sc.fsu.edu/~jburkardt/m_src/ziggurat/ziggurat.html

4 years ago | 0

Answered
Error opening file: Dot indexing is not supported for variables of this type. When opening a JPG image
The library contains executables for Windows and Linux but not for Mac. You need to cd into the library and use mex to compile j...

4 years ago | 0

Answered
Symbolic Toolbox finds no solution to biquadratic equation
syms A B C D E x R = solve(A*x^4 + B*x^3 + C*x^2 + D*x^1 + E*x^0, x, 'maxdegree', 4); now use coeffs on your original ex...

4 years ago | 0

Load more