Community Profile

photo

Jon


Last seen: 5 jours il y a Actif depuis 2013

Statistiques

  • Guiding Light
  • 6 Month Streak
  • Knowledgeable Level 5
  • Revival Level 1
  • First Review
  • Thankful Level 3
  • First Answer

Afficher les badges

Content Feed

Afficher par

Question


What is a simple way to check if a collection of vectors all have the same number of elements
I am look for a nice simple way to check if a collection of vectors all have the same number of elements. For example this migh...

5 jours il y a | 2 réponses | 0

2

réponses

A répondu
Concatenate two structures from a starting point
I think this example shows how to do what you are asking for % Make some example data d1 = datetime(2023,1,10):days(1):datetim...

5 jours il y a | 0

A répondu
why am I getting the error "Incorrect number or types of inputs or outputs for function 'step."
This runs for me in R2023b, what version are you running? If I look at the actual step.m file in my directory, which comes up as...

5 jours il y a | 0

A répondu
Change variables in the base workspace through a Matlab Function block
I would suggest using the "Interpreted MATLAB Function" block for this purpose. It doesn't need to get compiled. It is under Si...

6 jours il y a | 2

A répondu
Identifying regions in matrix rows
I wasn't completely clear from your description what output you wanted, but I think this is what you were looking for. Still lo...

9 jours il y a | 1

A répondu
How to make Simulink read a MatLab variable every 5 seconds?
You can do this using the set_param function. I have attached an example Simulink model and script you can run to demonstrate th...

13 jours il y a | 2

| A accepté

A répondu
Why does it take MATLAB so long to print hello world?
I'm not sure how you are running your test, running this script inside this online environment seems to indicate it is very f...

21 jours il y a | 0

A répondu
row ranking among multiple matrices
Similar to @Bruno Luong, but since I already coded up example before I saw @Bruno Luong's I will provide it as alternative here ...

environ un mois il y a | 1

A répondu
How to extract and to export to Excel some variables that have been logged using To Workspace block?
There are many ways to do this. I have attached a simple example showing one way to do it with the data being saved in timeserie...

environ un mois il y a | 1

| A accepté

A répondu
"Insufficient number of outputs from right hand side of equal sign to satisfy assignment." in Simulink
I found that if I changed the "Simulate using" parameter on the DUC from Code Generation to Interpreted execution, the model ra...

environ 2 mois il y a | 0

A répondu
Scatter plot with variable symbol size - it's not linear
According to the documentation for scatter, the size in "points squared" units, try this x = 1:100; y = ones( size(x) ); scat...

environ 2 mois il y a | 0

| A accepté

A répondu
Delete rows from a table below a certain threshold
% Make up some example data Time = [1:10]'; Data = randn(10,1)*10; Table = cat(2,Time,Data) Threshold = 8; % Delete rows ...

environ 2 mois il y a | 0

A répondu
FFT of bearing signal
In the attached code, I independently calculated the spectrum and compared to your calculation. It seems correct that your data ...

environ 2 mois il y a | 0

| A accepté

A répondu
Use files from multiple folders
Yes, this is possible. You can either open the file using the full path to the file, for example im = imread('c:/mystuff/myvid...

2 mois il y a | 1

A répondu
Multiple dropdown inputs to narrow down file options in App Designer
I have attached a very simple example of how you might have the choice from one drop down menu change the possible choices from ...

2 mois il y a | 0

| A accepté

A répondu
trying to find a linear combination of matrixes in order to minimize the error between the linear combination and a target matrix
Here's a much more elaborate approach that can be modified to use a specific choice of matrix norm to be minimized. I would use ...

2 mois il y a | 0

A répondu
How to Implement 3rd order equation in matlab script?
I would do it something like this: function ival = ifun(theta,psi) % Define constants K2 = 25; % just for example, you put in...

2 mois il y a | 0

| A accepté

A répondu
Plotting array filtered by column?
So to make @Dyuman Joshi suggestion more concrete % Define example points A = [ 1.0000 1.0000 5.5000 1.0000 ...

2 mois il y a | 0

| A accepté

A répondu
Can I use ismembertol to find x,y coordinates that are close to each other?
If I am understanding what you are trying to do correctly I think this would do what you ask % Define some example coordinates ...

2 mois il y a | 0

A répondu
Search for files in directory, and use file name to input data
I think this example shows you how you could solve your problem % Find all of the relevant files % for this example I used Exc...

3 mois il y a | 0

A répondu
FIFO push all values as vector
I assume you are using the Queue block in the DSP System Toolbox in Simulink. If so you should supply the In port with a 5 ele...

3 mois il y a | 0

| A accepté

A répondu
Does the resample function do sinc interpolation before resampling?
It sounds like you are not resampling at a new frequency (the main purpose of resample) but instead creating samples of a delaye...

3 mois il y a | 0

A répondu
Error due to integration
I don't have your Excel file to test your code, but it looks like your problem is that the function given to integral, in your c...

3 mois il y a | 0

A répondu
How to rename identical variables under one common name?
Here's a general way to handle this. Note no need for all those if statements % Read in the data T = readtable('myData.xlsx');...

3 mois il y a | 0

A répondu
How to sort a cell array with respect to another cell array?
cellA = {'A', 'B', 'C', 'D'; 1, 2, 3, 4; 5, 6, 7, 8; 9, 1, 2, 3} cellB = {'C', 'A', 'D'; 1, 2, 3; 4, 5, 6; 7, 8, 9} [lia,lib] ...

3 mois il y a | 2

A répondu
Can't connect to database when the servername has a backslash in it
There may be a much cleaner way to deal with this. I'm not sure of the details of why you get this error. Are you on a windows m...

3 mois il y a | 0

A répondu
How to combine two graph from two function in another script?
Example Run script 1 % Script 1 % define first curve t1 = linspace(0,5); y1 = t1 + 2*t1.^2; Run script 2 % Script 2 % de...

3 mois il y a | 0

| A accepté

A répondu
How to find the intersection of two curves with the input data being two vectors?
Here is an example of one way to do this, you would have to put in the data for your curves, I just made up two curves for this ...

3 mois il y a | 0

Question


How to implement arrays of events and listeners
I would like to be able to apply the event - listener methodology to obtain notification when specified, individual elements of...

3 mois il y a | 1 réponse | 0

1

réponse

A répondu
How to parse webpage JSON with temperatures in it.
You can use webread data = webread('https://api.meteo.lt/v1/stations/vilniaus-ams/observations/2023-06-21')

3 mois il y a | 0

| A accepté

Charger plus