Community Profile

# Jon

Last seen: Today Con actividad desde 2013

Ver insignias

#### Content Feed

Ver por

Respondida
Can someone help me open a Simulink file from an old version of matlab? (probably around year 2000)
I am able to open old Simulink .mdl files from around 1999-2000 using my MATLAB Simulink R2022b without taking any specific acti...

3 días hace | 0

Respondida
Saving the timestamp for each iteration in an array
You had numerous errors in your code. A key one is that you were writing the sensor data and time to the same column (B1). Since...

3 días hace | 0

Respondida
How to get z transfer function from difference equation?
I don't think there is any direct way to convert a difference equation to a transfer function in MATLAB. Maybe it is possible wi...

4 días hace | 1

Respondida
Find the set of eigenvectors of a 4x4 matrix elements whose matrix elements have some VARIABLE PARAMETERS.
If I understand what you are trying to do I think this should do what you want. The resulting values of the eigenvector for eac...

22 días hace | 1

Respondida
How can i plot this function? y=0.75/(log10(x)*2).^2
Something like this? x = linspace(1,10); % or whatever interval you would like change accordingly y = 0.75 ./(log10(x).^2).^2 ...

alrededor de 1 mes hace | 0

Respondida
Why do I receive "Index exceeds the number of array elements. Index must not exceed 7." when trying to remove indices that are followed directly by a zero using a for loop.
Your loop variable x goes from 1 to the length of the vector. In line 4 you try to assign vec(x+1), on the last iteration x = l...

alrededor de 1 mes hace | 0

Respondida
Only the initial graph shows up
The problem is that you have an error in your line Error using legend Invalid argument. Type 'help legend' for more informatio...

4 meses hace | 1

Respondida
How to simplify code with multiple variable names?
You can use arrays to hold your data. So one approach would be to use arrays: ma - n by 1 ea - k by n r - n by 1 ir n by 1 ...

4 meses hace | 0

Respondida
Hello, I need help with: Replace elements in Vector A with those of vector B of the same position, only if they meet a certain condition, otherwise replace by a zero. Thanks
I like @Torsten's one liner and use of the multiplication times the logical zeros to null out the values where B is greater than...

4 meses hace | 0

Respondida
My loop does not produce the results I want, due to coding errors
I have made numerous corrections in your code. I think this is now at least closer to what you want clc; clear; x0 = 0; y...

4 meses hace | 0

Respondida
How to plot many figure with For function?
Uncomment the line in your code that assigns the figure number So for i=1:20 figure(i) plot(array(:,1),array(:,i)) end

4 meses hace | 0

Respondida
How to solve a system of two linear equations in matrix form under a loop /
I'll assume you know how to calculate A and B based upon your c and T values. Then to solve for X use X = M\(J*A + B) Note tha...

4 meses hace | 0

Respondida
Bode diagram for a Butterworth filter
What specific problems or errors are you getting? Here is an example that maybe you can adapt to your situation fs = 1000; % sa...

4 meses hace | 0

Respondida
function for cell array
Here's a simple example % Make an example cell array with a vector in each cell A = cell(2,3); % preallocate for i = 1:2 ...

4 meses hace | 0

Respondida
Write a function largest () such that it can accept multiple numbers and return the largest item from the given list.
There is already a MATLAB function that "can accept multiple numbers and return the largest one" x = [2,15,23.7,91.4,80.3] % ve...

4 meses hace | 0

Respondida
How can I plot a curve while changing color every N points ?
I was coding up the example below, and by the time I posted I saw you already had an answer from @Cris LaPierre. I will still in...

4 meses hace | 0

Respondida
fprintf for ~million row string matrix
You could try writecell and see if that is more efficient.

4 meses hace | 0

Respondida
Plotting multiple .txt files
You could do something like what is shown in this simplified example % Get a list of all of the text files list = dir('*.txt...

4 meses hace | 1

Respondida

4 meses hace | 0

Respondida
How can I use the ( nchoosek ) for this case nchoosek(x,y) where x=[1:1:80] , and y=64;
Using b = nchoosek(80,64) You will see that there are approximately 2.6958 E16 ways of choosing 64 elements out of your vecto...

5 meses hace | 0

Respondida
I have a 4 Dimensional Matrix and i want to get its transpose
You can use the MATLAB permute function for this and not use any loops https://www.mathworks.com/help/matlab/ref/permute.html

5 meses hace | 1

Respondida
Modelling a variable (i.e. nonlinear) capacitor in Simulink: how to make it stable?
It looks like you may be using some circuit block set that I don't have available, however just going back to fundamentals you c...

5 meses hace | 0

Respondida
Matlab fails to launch appdesigner or open .mlapp files
Not really clear what is going on here, but it looks like you have a file called ComponentController.m whose error is preventing...

5 meses hace | 0

Respondida
Update App GUI with Simulink data in real-time
Please provide a little more context. From what you describe it sounds like your Simulink model has an interpreted MATLAB functi...

5 meses hace | 0

Respondida
How can I find the magnitude of a vector B when I know the unit vector B, the vector A and the result cross product of AXB?
Lets say you have the final Torque, and arm as a three element vectors T, and A respectiviely. Then I think the magnitude of th...

5 meses hace | 0

Respondida
How i can find the difference between 2 values.
y = T1 - T2

5 meses hace | 0

Respondida
command strategy for converting the following multi table text file into matlab array
If you don't know how many rows there are in each data set or where the data rows begin and end then you could do this: % read ...

5 meses hace | 0

Respondida
How to take the average of 7 rows then other 7 until the data finished and save into new tab of excel
Read the data in using readmatrix. Once you have read the table into an m by 150 array, let's call it A, then just use movmean ...

5 meses hace | 1

Respondida
I am getting data values as 1 x 100. How to reduce it to 1x6 i.e, require values of y w.r.t x at 0.2 0.4, 0.6, 0.8
I don't have the symbolic toolbox, but in ordinary MATLAB you would use interp1 for this

5 meses hace | 1