photo

David K.


Last seen: presque 2 ans il y a Actif depuis 2019

Followers: 0   Following: 0

Message

Statistiques

  • 3 Month Streak
  • Knowledgeable Level 4
  • Revival Level 1
  • First Answer

Afficher les badges

Feeds

Afficher par

Réponse apportée
Processing Frames from a Video
The VideoReader object looks like the way to go. With the basic case being: v = VideoReader('example.avi'); while hasFrame(v)...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
different colours in title MATLAB 2020B
The Add Title page has the answer to this. strcat(['\color{green}Green/Healthy= ',num2str(Healthy),',\color{orange}/Infected= ...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Appending a calculated value during each iteration of a for loop
I can't see right away what the dimension of [c_k.*exp(lambda*tspan(i))] is expected to be so I am just going to put out answ...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Mixing one audio signal to another at a specific point
This is fairly easy at first. You just need to pad the signal a2 with enough zeros to equal 10 seconds. This requires knowledge ...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
eq() and == failing to find matches in generated array.
You are right that it is floating point precision. There are many ways to deal with this and your comment shows one of them with...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Label point on FFT plot
The text function seems to be what you want. After plot use: text(fft_locs,fft_pks,'your label here');

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Text output from script
I would look at the 'publish' capabilities. At the top of matlab, if you switch from 'Editor' to 'Publish' you can output your c...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Array Error Must be Positive
If you read the whole error message you see this : Array indices must be positive integers or logical values. This is caused b...

plus de 3 ans il y a | 0

Réponse apportée
Writing excel files with different names
This can be done nearly the way you guessed: for n = 1:10 writematrix(cutoff,['outdataFFT',num2str(n),'.xlsx']) end The key...

presque 4 ans il y a | 0

Réponse apportée
Fourier Transform of an array of IQ pairs
The fft function has a dimension input that allows you to specify which dimension of a matrix you are taking the fft's over. S...

presque 4 ans il y a | 0

Réponse apportée
Changing a for loop to recursion
Recursion happens when a function calls itself, which is something you are not doing. The first step when creating a recursive...

environ 5 ans il y a | 1

| A accepté

Réponse apportée
matlab loops/if statements help for a beginner
So problem 1 is that size is outputting a vector and not a single value. It outputs both dimensions so for your example m is [1 ...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
Trying to play Sound at random times during elapsed time.
So as you noticed, etime == randomTime will not work because etime needs input arguments. So fix that issue with this: etime(cl...

environ 5 ans il y a | 1

| A accepté

Réponse apportée
Splitting a table into smaller ones based on two columns
I would do it as such: n = 1; a = your table% I used table([1;2;3;4;5;],[1;5;1;3;1]) to sort of test while ~isempty(a) % whi...

environ 5 ans il y a | 1

Réponse apportée
How can I make a step response graph for open Loop Ziegler-Nichols Method?
When trying to do transfer functions in matlab one very nice way to do it is with s = tf('s'); Now, s indicates it is a trans...

environ 5 ans il y a | 1

Réponse apportée
Help with Padovan Sequence
You cannot start at P(0) because matlab does not let you index at 0. However, you can make it so that it works as expected. Ever...

environ 5 ans il y a | 2

| A accepté

Réponse apportée
Convert row or coloumn matrix into rowXcoloumn matrix
I would do it as such: P = 1:10; out = reshape(P,[2,5]); out = out'; % Take transpose

environ 5 ans il y a | 0

| A accepté

Réponse apportée
Two dimensional interpolation polynomial
First off, I looked a little bit on wikis to find https://en.wikipedia.org/wiki/Multivariate_interpolation which might have what...

environ 5 ans il y a | 1

| A accepté

Réponse apportée
Plotting loop value according to years
The problem is that the value b is not being saved within the loop, so your plot function is trying to plot a single value which...

environ 5 ans il y a | 0

Réponse apportée
How to calculate averaged values from 5-min interval values
Using for loops is a very straightforward way that this can be done: x = yourData; %your data size1 = length(x)/12; size2 = 2...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
Separating a colymn into two columns (.txt file)
I would do it like this: %t = your table; dataCell = table2cell(t); % convert to cells dataCell = dataCell(11:end); % remove ...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
Unable to perform assignment because the left and right sides have a different number of elements.
The first problem is that Tr is a vector being assigned to a single value of r1, this is fixed as such: r1(n+1)=r1(n)+h*(K01*(C...

environ 5 ans il y a | 0

Réponse apportée
I need help with some graphs
Since you need to plot in 3 dimensions I will be using the surf function. What I would first do is solve all of these equation...

environ 5 ans il y a | 1

Réponse apportée
Simulink - How to create a conditional "if" block with more than 3 conditions?
**Moved from questions to answer** When you know the matlab code needed to do something in Simulink a Matlab Fuction Block can ...

environ 5 ans il y a | 2

| A accepté

Réponse apportée
How to skip a file in reading a series of csv files using csvread?
One method, though it may be one that is often advised against, is to use a try catch block around the code. When an error occur...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
How to change the style or fount of a static text on GUIDE
Inside the guide interface you can double click the static text to bring up its properties. Then, you can change the listed font...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
Updating a value inside for loop
A common way people do things like this is with an if statement. For the condition of the if statement you need to relate it to ...

environ 5 ans il y a | 1

| A accepté

Réponse apportée
hi how to solve below eqation in matlab command window in tf command
The tf function expects the num and den to be matrices that hold the coefficients to the numerator and denominator. In your case...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
plotting data from data files and saving each plot through out each run of the loop
If you wish to have all the plots on the same figure, you need to use figure; hold on %The rest of your code If you wish to...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
Element replacement of matrix.
If using a for loop is not actually a requirement you can do this very simply as such: myMatrix = rand(5,4); % create 5x4 matri...

environ 5 ans il y a | 0

| A accepté

Charger plus