Community Profile

photo

Jon


Last seen: 3 days ago Active since 2013

Statistics

  • 6 Month Streak
  • Knowledgeable Level 4
  • Pro
  • Revival Level 1
  • First Review
  • Thankful Level 2
  • First Answer

View badges

Content Feed

View by

Answered
How to convert time column into a regular array?
t = seconds(A_time.Time - A_time.Time(1))

3 days ago | 0

Answered
"Unable to find or open 'Filename.txt'" error in MATLAB 2022a for files from a shared network drive.
Sometimes Windows loses the connection to the mapped drive. Can you still open the folder in Windows File Explorer? Sometimes it...

3 days ago | 0

Answered
Accessing appdesigner objects properties from a function
First, I'm not sure why you would want to just have a single button pushed callback for multiple buttons. Why not just break th...

4 days ago | 0

Question


Is applying a binary operator (+,-,*,/) to char arrays supported by MATLAB or just a "trick"
I recently came across the use of the following way to obtain the individual digits of a binary number as an array of doubles, f...

4 days ago | 5 answers | 2

5

answers

Answered
Find the Minimum Combination of Sum
If I understand what you are trying to do, I think this might work for you A = rand(100,1); % define matrix which can be mul...

5 days ago | 1

Answered
I want to plot graph between partial pressure of ammonia and Length but it has error.
Note that in your assignment for pNH3 the index is n, not n+1 so it only get assigned values up to the max value of n set by th...

5 days ago | 0

| accepted

Answered
calculate the minimum probability
Say you have three matrices of the same size A,B,C then you can find the minimum as you describe using D = min(min(A,B),C)

5 days ago | 0

| accepted

Answered
Why doesn't Newton's method calculate the correct temperature
Is there a reason you are using your own solver here rather than the MATLAB fzero (for function of one variable) or fsolve for s...

7 days ago | 0

| accepted

Answered
Simulation of random walk
It looks like you already "store the j values into the array node_visited. So it looks like you should be doing your summaries...

10 days ago | 0

| accepted

Answered
Check an entire matrix against each value of another matrix
If I understand what you are looking for, I think this will do it in a very simple way c = intersect(a,b) >> a = [4 3]; b = [...

10 days ago | 0

| accepted

Answered
How can the points of a scatter plot placed on a new matrix?
Assuming you mean by the first point, second point, etc in the scatter plot their order of appearance from left to right (along ...

10 days ago | 0

| accepted

Answered
How to find indices in a vector satisfying a condition for a minimum consecutive number of entries
Here's one approach. You could shorten this up a little by combining some of the individual statements into more complicated on...

11 days ago | 1

| accepted

Answered
Check numbers in a 5x5 array
You can also do this without any loops using MATLAB's intersect function which lists the common elements between two arrays. Hin...

11 days ago | 0

Answered
Can someone help me writing this equation in matlab, I appreciate,..
Here is an example where I have supplied some arbitrary values for P,N, phi and omega. You can modify with the values you actual...

12 days ago | 0

| accepted

Answered
Drop Down Button (App Designer) return index of repeated elements
Here's a skeleton of the logic regarding using unique. You will have to adapt details regarding getting the users selection etc....

12 days ago | 0

| accepted

Answered
Dimensions of arrays being concatenated are not consistent error .
There is a problem with your approach, which is setting the initial condition for the second block (the one that the switch is ...

12 days ago | 0

| accepted

Answered
how can i negative all value in a matrix except diagonal?
Am = -(A - diag(diag(A))) + diag(diag(A))

13 days ago | 1

Answered
Algorithm to calculate trajectories from a vector field
The trajectories you are seeking are solutions to a set of ordinary differential equations with initial conditions given by the ...

14 days ago | 1

| accepted

Answered
how to save some variables created in a loop
You need to provide a vector to collect your values in, so something like this numIterations = 10; % put total iterations here ...

14 days ago | 0

Answered
Tell the user something is wrong
If I understand your question, I think that you may find that you can use MATLAB's errordlg function can do what you are looking...

14 days ago | 0

Answered
How to convert cell to matrix
Side stepping the issue a little bit, I can read in your data file perfectly as numerical values and not use cell2mat at all usi...

14 days ago | 1

| accepted

Answered
sensitivity analysis generate random integer values
Sound like you are looking for the MATLAB randi function, you can get details by typing doc randi on the command line

14 days ago | 0

Answered
Save each output step in rows in a larger matrix
You have a number of problems with your code. The main problem, if you want to save the results of each iteration in variable Q...

17 days ago | 0

| accepted

Answered
representing the correlation function
In your code the sin wave signal will have an amplitude of one, and the stadard deviation of the noise signal will also be one. ...

17 days ago | 0

Answered
Struggling to plot the data over timestamps!
I copied and pasted your data into an .xlsx file (attached here) and ran your commands (only modified to have the .xlsx file in ...

17 days ago | 0

Answered
How to create an interactive graph to show how data changes when one factor in an equation is changed
Here is a good example of building an app in app designer with graphs that change as values of parameters are changed by the us...

18 days ago | 0

| accepted

Answered
find the equal values that stand together on the same row or column or diagonal in the matrix
I am assuming here that to satisfy your criteria you must have a group of 5 or more ones in any row, column or diagonal or a gro...

19 days ago | 1

Answered
Why does my closed loop pole-zero map appear to indicate a critically damped system but a step input results in an under-damped response?
If you remove the time delay the response has no oscillations as you expected. I know you said "**Just as a side note, taking a...

1 month ago | 0

| accepted

Answered
Why does a sine bandwidth decrease with 1/dur, dur beeing the signal duration
I don't have enough time at the moment to look at your code in depth, but I'm suspecting that you are experiencing "leakage" eff...

1 month ago | 0

Answered
Comparing curves to an original signal
In terms of frequency response of a transfer function it looks like you could make the orange curve move towards the purple cur...

1 month ago | 0

| accepted

Load more