Community Profile

photo

chicken vector


Last seen: Today Active since 2020

Statistics

All
  • Knowledgeable Level 3
  • Thankful Level 3
  • Solver
  • First Answer
  • First Submission
  • Thankful Level 2

View badges

Content Feed

Answered
How can I make my lamp indicator color turn green once it reaches a certain number with the app.label.Text
uilabel dont allow much interactivity. I guess you have some familiarity with Callbacks, so I suggest you to use uieditfield an...

19 hours ago | 0

Answered
Combine Plot and Scatter in Legend
x = 1:10; y1 = randi(10,1,10); y2 = randi(10,1,10); y3 = randi(10,1,10); figure; hold on; grid on; plot(x,y1,':d',... ...

20 hours ago | 0

| accepted

Answered
Graphical output of subscripts in one main script
Your code is fine but you need to delete the first line: clc, clear, close all I did it and saved your script naming it fig_4....

20 hours ago | 0

Solved


Find the longest sequence of 1's in a binary sequence.
Given a string such as s = '011110010000000100010111' find the length of the longest string of consecutive 1's. In this examp...

1 day ago

Answered
Looping for cell arrays
Add a second loop for the rows: for row = 1 : size(down_files,1) for col = 1 : size(down_files,2) fileread(down_f...

1 day ago | 0

Answered
Help with matlab script
1) Correct me if I am wrong, but with "I'm not seeing the values appear in the workspace", I think you are saying you only see t...

1 day ago | 0

Answered
I am getting the following error: Error using atan2 Inputs must be real. Error in (line 27) phi_vet = 2*atan2(-k_1-sqrt(k_1.^2+k_2.^2-k_3.2),k_3-k_2);
The term inside the square roort has some negative values, thus producing imaginary numbers. sqrt(k_1.^2+k_2.^2-k_3.^2) I am...

1 day ago | 0

| accepted

Answered
Hyperbolic Fitting using multiple data sets from each experiment.
Please try to use the forum next time, as your answer was just a simple search away. data = readmatrix('Model.xlsx'); x = da...

1 day ago | 0

Answered
Finding correct MinPeakDistance using for loop
Your idea of increasing 'MinPeakDistance' to adjust the peaks found is not consistent. For example, if you iterate manually, yo...

1 day ago | 0

Answered
fill and replicate numbers in the matrix
You can re-adapt your data to exploit this very nice method to divide stimuli into a cell array. Then is just a metter of manip...

3 days ago | 0

| accepted

Answered
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...

3 days ago | 0

Answered
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...

3 days ago | 0

Answered
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...

3 days ago | 0

Answered
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...

3 days ago | 0

Answered
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...

3 days ago | 0

Answered
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....

3 days ago | 0

Answered
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...

4 days ago | 0

Answered
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); ...

4 days ago | 0

| accepted

Answered
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...

4 days ago | 0

| accepted

Answered
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...

4 days ago | 0

| accepted

Answered
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...

5 days ago | 0

Answered
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...

5 days ago | 1

| accepted

Answered
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...

5 days ago | 1

Solved


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

5 days ago

Answered
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 = '...

5 days ago | 0

Answered
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 ...

5 days ago | 0

Answered
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...

5 days ago | 1

| accepted

Answered
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. ...

6 days ago | 0

Solved


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...

6 days ago

Answered
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; ...

6 days ago | 0

| accepted

Load more