Answered
Is there a way to access array elements returned by a function directly
What you've written is not valid MATLAB syntax. You could do something close to what you want using a helper function. valueAt ...

5 years ago | 0

Answered
Operations by matrix disease: 1.000.. - 1 is not equal to zero
Welcome to the world of floating-point arithmetic. Please try this little experiment. Find something to write with and somethin...

5 years ago | 0

Answered
How can I not count some rows within X,Y columns that contain X>=3 to alter the bin counts of Y for a histogram?
If I understand your goal correctly I think you want to call histogram with the 'BinLimits' name-value pair.

5 years ago | 0

Answered
How to solve A*x=0 in Matlab?
Use the null function, but remember the zero vector will also be a solution.

5 years ago | 0

Answered
What is this assignment statement attempting to do?
This calls the meanX function with raw_data as input and returns two outputs. We can speculate as to what meanX does from its na...

5 years ago | 0

Answered
Kindly any one help me regarding MATLAB GUI guide execution of my research work?
If you want to plot into an axes in your GUI, why are you explicitly creating a new figure? figure; hold Specify the handles o...

5 years ago | 0

Answered
Proof eigenvector matches to a given matrix
What is the definition of the eigenvector of a matrix? Can you demonstrate that A and b satisfy that definition?

5 years ago | 0

Answered
What is the Best Way to Deal with an Empty Line Object?
x = 1:10; y = 1:10; i1 = x<=3; i2 = x > 100; i3 = x >= 7; hold on plot(x(i1),y(i1),'r','DisplayName', 'first'); plot(x(i...

5 years ago | 0

Answered
Unable to resolve the name phased.internal
See Bug Report 2470530. Apply the workaround given in that bug report or fix it by installing release R2021a Update 2 if possibl...

5 years ago | 2

| accepted

Answered
Using a loop to replace spaces for underscore
Use the replace function. before = 'Hello world' after = replace(before, ' ', ' cruel ')

5 years ago | 0

Answered
How do I specify time increment in computation in for loop?
for loops can iterate over arbitrary vectors, not just 1:something. x = 1:0.5:5; for k = x fprintf("The value of k is %f....

5 years ago | 0

Answered
how to determine efficiency centrality of a node in Matlab
Build a graph or digraph representation of your network and call centrality on it. Depending on how you define "efficiency" you ...

5 years ago | 0

Answered
Strange behaviour of a function handel
According to Google Bill Gates has a net worth of 126.5 billion USD. If you saw him on the street and handed him a $20 bill, wou...

5 years ago | 0

| accepted

Answered
How to solve "Maximum recursion limit of 500 reached." error
You've created a script file clc.m that tries to call the built-in clc function on its first line. The clc.m you've created take...

5 years ago | 1

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

Load more