Answered
How to use the random variables Xt (outcomes of a dice roll) to define another random variable T5 ?
I wouldn't use rand here. I'd use randi to directly generate the values of the fair die roll. [If you were later going to simula...

5 years ago | 0

Answered
How can I write this complex equation in matlab? in order to find i1 & i2
See this documentation page.

5 years ago | 1

| accepted

Answered
Could anyone please help me with an example of LSTM network matlab code.
One of the "Related Topics" listed at the end of the documentation page to which I linked in my comment on the question is "Time...

5 years ago | 0

Answered
limit of a function is giving another limit
Let's look at your function. syms y z_0 = 2; z_1 = 3; lambda = 4; fun2 = 0.5.*(1./(y.^2)).*besselj(0,(2.*pi./lambda).*(1./y...

5 years ago | 0

Answered
Date stamp on plot
plot(1:10, 1:10) title("This plot was created at " + string(datetime('now')))

5 years ago | 0

Answered
Cubic spline interpolation in interp1 doesn't remove NaN
The fillmissing function offers several methods to use in filling in the missing data (NaN in the case of your numeric data.) On...

5 years ago | 0

Answered
How to remove null matrices from a multidemensional array?
Use the capability of the any function to accept a vector of dimensions over which to operate. z = zeros(3); r = @() rand(3); ...

5 years ago | 0

Answered
"Highlight" a vertical gridline on a figure
There are a couple possible ways to do this. Off the top of my head the one I'd probably use is to set the YAxisLocation propert...

5 years ago | 0

Answered
I want to create a square wave shows in the Picture
Looking at the Plots tab of the Toolstrip, the thumbnail that looks closest to the picture that you posted is the stairs functio...

5 years ago | 0

Answered
How to combine matrices with different size but preserve elements with same value?
None of A, B, or C have four columns like you stated you had. You didn't indicate how you generated C from A and B, but one way...

5 years ago | 0

Answered
Force ticks in subplot plots histogram
Consider linking the axes limits using the linkaxes function.

5 years ago | 1

| accepted

Answered
Create an string array with strings having both char and numbers
n = 5; S = "Analysis_" + (1:n) You can also use implicit expansion to make an array if you so desired. fruits = ["apple"; "ba...

5 years ago | 1

Answered
How to make the code efficient?
Are you trying to find the points on an elliptic curve over F_n? You could probably try a variant of the naive approach given o...

5 years ago | 1

Answered
how can i fix the "error using cd"?
Did you use fullfile to assemble the ExportPath variable, did you manually concatenate pieces together with slashes inbetween, o...

5 years ago | 0

Answered
Convert datetime to default format
inp_time='16:30:00 13-05-21'; dtime=datetime(inp_time,'InputFormat','HH:MM:SS dd-mm-yy') Have you tried swapping the M and m p...

5 years ago | 0

Answered
Genetic algorithm options in MATLAB R2013
See this documentation page for a list of the options changes that took place in release R2016a in Global Optimization Toolbox. ...

5 years ago | 0

Answered
Receiving error "Unrecognized function or variable 'tf'" even though I have the Signal Processing Toolbox installed.
which -all tf There are several functions named tf in various MathWorks products, but most of them are intended for use in conv...

5 years ago | 0

Answered
How to place percent of each bar/bin of histogram on histogram chart in the code below?
Let's make some sample data and plot a histogram with a small number of bins. x = randn(1, 1e4); h = histogram(x, 'NumBins', 1...

5 years ago | 0

Answered
errors in using RESHAPE FUNCTION......PLEASE HELP ME.
More likely than not your image_Container variable has 3 or more dimensions. x = randi(10, [2 3 4]); sz = size(x) sz1 = size(...

5 years ago | 0

Answered
How do i write the constructor for this?
See this documentation page for a list of guidelines about how class constructors should look.

5 years ago | 0

Answered
reduce the working precision
Take a look at Fixed-Point Designer. It may do what you want.

5 years ago | 0

Answered
Problem using polyfit in a loop
If you're trying to remove a polynomial trend from your data, see the detrend function. As of release R2019a you can specify a d...

5 years ago | 0

Answered
My code is garbled opening with a higher version matlab
Did your code try to write an image file (specifically a PNG image) using imwrite? If so, I suspect you overwrote your function ...

5 years ago | 1

Answered
How can I create a GUI to change the bins of a histogram?
Change the NumBins property of the histogram object in your slider callback if you want to explicitly control the number of bins...

5 years ago | 0

Answered
does not exist.
Well, does it? Check with Windows Explorer. Rather than using sprintf (where you need to be careful which slashes you use) I wo...

5 years ago | 0

Answered
Which format can be choosen
syms x f = - 0.00000000000000000000000044574112852848068606808271927672*x^21 + 0.0000000000000000030044127779970749176557242324...

5 years ago | 0

| accepted

Answered
Question on summing bins in hist
Instead of using hist, I recommend using histogram. You will want to set the 'Normalization' option when you call histogram.

5 years ago | 0

| accepted

Answered
Out of memory. The likely cause is an infinite recursion within the program.
Let's look at the first couple lines of your function. function [x,n] = secuno(n0,n1,n2) % Genera x[n] = u[n ยก n0]; n1 <= n <=...

5 years ago | 0

| accepted

Answered
Fitnet: Can we forbid the normalization pre processing ?
net = fitnet(10); net.inputs{1} You want to modify the processFcns property of the net.inputs{1} object. See this documentatio...

5 years ago | 0

| accepted

Answered
VariableNames for table that begins with number
The ability to use table variable names that are not valid MATLAB variable names was introduced in release R2019b.

5 years ago | 0

| accepted

Load more