답변 있음
Help with making an Ellipse Area function
The only error I can see is that you need to assign something to the ‘area’ variable in your ‘EllipseArea’ function. I assign...

18일 전 | 1

답변 있음
I'm trying to plot a mat file with a 1x1 structure, but it's giving the error that "Index in position 2 exceeds array bounds. Index must not exceed 1."
When you load into a variable, that creates a structure. The information you want will then be in that structure. data1 = lo...

19일 전 | 0

답변 있음
automating many column headings in table
Perhaps something like this — A = randn(5,10); T1 = array2table(A, VariableNames=compose('physical state at step %4d',1:size(...

19일 전 | 0

| 수락됨

답변 있음
Finding specific peaks and valleys
To find specific valleys, one option might be to use the MinPeakProminence value. The prominences are the tthird output returne...

19일 전 | 0

| 수락됨

답변 있음
How can I plot multiple figures in one from multiple saved .fig files that have 2 figures but I only want 1 of them?
It would help to have at least one of the .fig files to work with. In general, use the openfig function to open each file. T...

19일 전 | 0

| 수락됨

답변 있음
How do i calculate the standard deviation from multiple csv files where i would like the standard deviation for each second?
Perhaps this — Time = datetime('now')+seconds(0:2).'; Time.Format = 'H:mm:ss'; Temperature = [20.754 19.219 19.338 20.89; 20...

19일 전 | 0

답변 있음
Convert Set of (x,y) Coordinates Into Polygon
Try this — LD = load('coordinates.mat') coordinates = LD.coords; shp = alphaShape(coordinates(:,1),coordinates(:,2),'HoleT...

20일 전 | 2

답변 있음
Compare two irregularly sampled, noisy sinusoidal signals
Use the nufft function for irregularly-sampled data. Beyond that, ‘similarity’ is a somewhat amorphous concept. I did a line...

20일 전 | 1

| 수락됨

답변 있음
Multiple regression with nonlinear variables
I am not certain what you want to do. Fitting a generalized additive model (GAM) for regression using the fitrgam function wo...

20일 전 | 1

| 수락됨

답변 있음
Converting timestamp from TDMS LabView
I did not see the .mat file before, although I did look for it. Try this — LD = load('timestamp.mat') format long timesta...

20일 전 | 0

| 수락됨

답변 있음
Variables from CSV column read incorrectly
I cannot reproduce that. Everything in your code seems to work correctly, and there are no NaN values (when run in R2024b). ...

21일 전 | 0

답변 있음
Extracting Data from Table
It would help to have your data. Lacking it, consider doing something like this — T1 = table(reshape(repmat((1:5),5,1),[],1...

22일 전 | 0

| 수락됨

답변 있음
display ‰ symbol in xlabel with latex interpreter
I think it’s hanging up on the ‘\textperthousand’ call. When I searched online, that and ‘permille’ are not generally supported...

22일 전 | 0

답변 있음
I am calling outside functions for this code, but when I am getting an error saying I have too many output arguments. I think the error is within my function LandingDistance
The reason is that ‘LandingDistance’ doesn’t return any outputs: function LandingDistance(d1, d2, v0, thetaL) You probably wa...

23일 전 | 0

답변 있음
The mesh function is not working for me in offline Matlab, but when I check this code in online Matlab, it works. What is the reason?
We do not have access to your computer. Run these from your Command Window or a script: restoredefaultpath rehash toolbox...

23일 전 | 0

답변 있음
Intel vs AMD for a new build in 2025
My preference would be a high-end Ryzen CPU, at least a 1TB SSD, and as much memory as you can manage. (I have the laptop versi...

23일 전 | 1

답변 있음
I am trying to edit an old code to simplify it but I keep getting errors. Right now I am getting the script name error even though I have followed instructions fo rnaming
Your code works here. I’m not quite sure what you’re doing. You cannot have a script name with the same name as the function...

23일 전 | 0

답변 있음
MATLAB doesn't recognize the function optimoptions
MATLAB is case-sensitive. Try this — options = optimoptions('ga') . .

23일 전 | 0

답변 있음
Trying to plot two vectors of unequal lengths on the same X and Y axes
There is probably no good way of doing this without compromising the data in some way. The way I would choose would be to to ...

24일 전 | 0

답변 있음
Calculate slope of groups of numbers in a table
Try something like this — T1 = table(reshape(repmat((1:5),5,1),[],1), sort(rand(25,1)), randn(25,1), VariableNames=["Class","X...

27일 전 | 0

| 수락됨

답변 있음
Extracting Data from Figures and Vectors
The easiest way is to use the interp1 function — clear, clc, close all EI = 29000*13400; % Flexural rigidity L = 48; % L...

27일 전 | 0

| 수락됨

답변 있음
Area of the hysteresis loops
These do not look like hysteresis curves to me. At least, I do not see any that form loops. (I am not certain what the ‘Cycle ...

28일 전 | 0

| 수락됨

답변 있음
Indexing in nonsequential order
I do not completely understand your problem, however one solution could be to use the dir function to retrieve all the files in ...

28일 전 | 0

답변 있음
Why I am I getting a row
Thge easiest way is: x1 = x1(:) since this will force ‘x1’ to be a column vector regardless of its previous orientation. ...

28일 전 | 0

답변 있음
Data extraction/split from table
I am not certain what reesult you want, however findgroups and accumarray (or splitapply) together are likely the direction in w...

29일 전 | 1

| 수락됨

답변 있음
plotting functions with two y axes
Use the yyaxis function. It should work with tiledlayout axes. EDIT — (19 Jan 2025 at 16:10) I am not certain what result...

대략 1개월 전 | 0

| 수락됨

답변 있음
Which matlab will i be able to use in my pc?
See Platform Road Map for the MATLAB and Simulink Product Families I doubt that any available releases will run on your co...

대략 1개월 전 | 0

답변 있음
Use of symbolix toolbox to derive PI controller Kp,Ki
You can get there, however you have to force iit — syms K_P K_I L R s xi omega_0 real G_PI = (K_P*s + K_I) / s G_RL = 1 / (L...

대략 1개월 전 | 0

| 수락됨

답변 있음
How to Calculate dominant frequency and centroid frequency and plot them together
The spectralCentroid 9s plotted with respect to time, and the values go from near zero to 7.14 Hz. The dominant frequency is 0....

대략 1개월 전 | 0

답변 있음
Find imapedance of a circuit with mesured current and voltage and frequency sweep(up to 1MHz). C and L are unknow.
By convention, the real part is the voltage, and the imaginary part is the current. Thje phase is the angle between them. Oh...

대략 1개월 전 | 0

더 보기