Réponse apportée
EEG frequence and noise estemation
Look at fft documentation: x=load('5.txt'); y = fft(x); PS = abs(y).^2; N = length(x); fs = 500; % From documentatio...

plus de 3 ans il y a | 0

Réponse apportée
how is it possible to correspond negative coordinates to matrix indices?
You can normalise the coordiante to transorm them into indeces: x = -9.5 : 9.5; % -9.5 -8.5 ... 8.5 9.5 xIdx = x - x...

plus de 3 ans il y a | 0

Réponse apportée
Make a Truth Table
From the graph I see that the peaks marked are, as you say, over the half, but of the limits of the y axis, not of the maximum v...

plus de 3 ans il y a | 0

Réponse apportée
How do I make ListBox items wrap?
In general, for uicontrol components you would use textwrap, but it doesn't work in App Designer. Some of them, such as uibutto...

plus de 3 ans il y a | 0

Réponse apportée
How to save and later clear the data taken through editText in a .txt file automatically with the current timestamp ?
You can use the Children property of your (ui)figure to collect every TextEdit object and access the String inside. You can the...

plus de 3 ans il y a | 0

Réponse apportée
How can I process the image and extract the spacing between individuals dots in a row ?
img = imread('image.png'); [centers, radii, metric] = imfindcircles(img,[5 18]); You can compute the distances from centers....

plus de 3 ans il y a | 0

Réponse apportée
Plotting matrix on grid of squares
I learned to code these kind of applications by studying Brian Moore's File Exchange. In particular, you can check his very nic...

plus de 3 ans il y a | 0

Réponse apportée
I have a matrix and a Structure array. I want to export them as an Xlsx file, with the matrix on sheet one and the Structure array on sheet two
writematrix(cell2mat(struct2cell(structName)), 'filename.xls', 'Sheet', 1); writematrix(rankine, 'filename.xls', 'Sheet', 2); ...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Plot index of for loop
I used annotation because accepts normalised units, otherwise text might be a better option. Have a look at it. Also I stronlgy...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
run loop once with a click on push button
If I understood correctly, you want to extract one name from a list of names. In this case you don't need a loop. At first glan...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Help requested for generating an example for this kind of 3D plot
You can use surf to generate 3D meshes and inpolygon as binary mask to customise the shape of the base grid. % Number of grid...

plus de 3 ans il y a | 0

Réponse apportée
find matching multiple condition
k will be true (or logical 1) if reset needs to be applied. false (or logical 0) otherwise. load('resettimehelp.mat'); curr...

plus de 3 ans il y a | 1

| A accepté

Réponse apportée
Using mat2cell in a proper way
When you use mat2cell, besides the first entry that is the matrix you want to modify into a cell, the other inputs give the inst...

plus de 3 ans il y a | 1

A résolu


Is my wife right?
Regardless of input, output the string 'yes'.

plus de 3 ans il y a

Réponse apportée
How to change HH:mm:ss:SSS to HH:mm:ss.SSS for a column?
if the time format is imported from the .txt as a string, you can do the following using a for loop for every element: time = '...

plus de 3 ans il y a | 0

Réponse apportée
problem in using meshgrid and how to show the variation of a parameter in the field
Your problem is related to the definition itself of pcolor. To quote the documentation: "The color of each face depends on ...

plus de 3 ans il y a | 0

Réponse apportée
Filling the area in a plot without overlapping
You can select the number of plots and curves you want using nPlots and nCurves, respectively. You can also add more colors usi...

plus de 3 ans il y a | 1

| A accepté

Réponse apportée
how to create a time series from an excel data sheet containing hourly load in 1095 rows and 23 columns. no date or time in the excel data file.
According to the documentation, timeseries has to be either a scalar or a vector of scalars, therefore you can't use datetime. ...

plus de 3 ans il y a | 0

A résolu


Matrix of Multiplication Facts
This is James's daughter again, sneaking into his Cody account. Thanks to your help in my math class last year, I did great! But...

plus de 3 ans il y a

Réponse apportée
Want to use nested For loop
You need to add a second dimension to your z array: n0 = 1; n1 = 2; n2 = 1; n3 = 2; d1 = 0.1; d2 = 0.2; lam = 3:0.01:7; ...

plus de 3 ans il y a | 0

| A accepté

A résolu


Count the peaceful queens
In a 5x5 chessboard with a queen of one color (white, say) on the perimeter, one can place 12 black queens on the board such tha...

plus de 3 ans il y a

Réponse apportée
Calculate Satellite TLE from Satellite Object
The reason why you haven't found a method is because it doesn't make sense physically. TLE are data format that condense inform...

plus de 3 ans il y a | 1

| A accepté

Réponse apportée
How to program a menu with callbacks upon selection?
Have a look at this simple app. You can selecte different voices from the menu bar and see the results on the GUI. Be caref...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Generalizing Function Calls with Property Dependence in App Designer
Use: app.(prop_name).current to use strings as class properties (or structure fields).

plus de 3 ans il y a | 1

| A accepté

Réponse apportée
what @ does in MATLAB?
In this case @ is used to call a superclass method from a subclass. Consider the classes Food and Donut, such that Donut is a s...

plus de 3 ans il y a | 5

| A accepté

Réponse apportée
How to simulate number of visible satellite over the globe?
Depending on your needs and data, I suggest you to take a look at: contourf geocontourxy geoplot

plus de 3 ans il y a | 0

Réponse apportée
How to eliminate for loop and perform the computation parallely?
%% Data: fs = 35000; T = 100; Nt = fs*T; M = 60; a1 = randn(M,Nt); a2 = randn(M,Nt); lambda = randn(1,Nt); B = randn(M...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
How can I make a set of stimuli composed of pseudorandom dots of the same size and each stimuli having different spatial frequencies/densities?
This is slow and inefficient and can be improven with more pseudo-random techniques, but it does the tricks: % Dots size: dotS...

plus de 3 ans il y a | 0

Réponse apportée
Display elapsed time in hours, minutes, and seconds
time = seconds(4321) time.Format = 'hh:mm:ss'

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Image Rotation based of the location of four circles in the image
Assuming that you you have x and y coordinates of the centers: % Get centers' coordinates: xCenters = centers(:,1); yCenters ...

plus de 3 ans il y a | 0

| A accepté

Charger plus