
Les Beckham
Many years developing flight control algorithms and software
C++, C, C#, MATLAB, Assembly
Professional Interests:
Statistics
2 Preguntas
253 Respuestas
0 Problemas
26 Soluciones
CLASIFICACIÓN
161
of 273.563
REPUTACIÓN
672
CONTRIBUCIONES
2 Preguntas
253 Respuestas
ACEPTACIÓN DE RESPUESTAS
50.0%
VOTOS RECIBIDOS
88
CLASIFICACIÓN
of 18.459
REPUTACIÓN
N/A
EVALUACIÓN MEDIA
0.00
CONTRIBUCIONES
0 Archivos
DESCARGAS
0
ALL TIME DESCARGAS
0
CLASIFICACIÓN
14.028
of 123.032
CONTRIBUCIONES
0 Problemas
26 Soluciones
PUNTUACIÓN
261
NÚMERO DE INSIGNIAS
1
CONTRIBUCIONES
0 Publicaciones
CONTRIBUCIONES
0 Público Canales
EVALUACIÓN MEDIA
CONTRIBUCIONES
0 Temas destacados
MEDIA DE ME GUSTA
Content Feed
Variable as placeholder in an "fopen" statement
The way I would do this is this subject = "PO1"; folder = "/Users/addison/Documents/Data/"; filename = "Results2" + subject +...
18 minutos hace | 0
Extract data points from a plot corresponding to the plot legend
fig = openfig('ExampleData.fig'); % open and get a handle to the figure % get(fig); ax = get(fig, 'CurrentAxes'); % get handle...
alrededor de 16 horas hace | 0
How can I create for loop on contourf and save plots somewhere?
I'm not sure I believe this data since we are seeing probablities of > 1 in some cases (perhaps an interpolation/extrapolation a...
alrededor de 16 horas hace | 0
Loading data from .mat file and converting them to string array
You only save one variable into the mat file and its name is Grades. The syntax load('matfilename.mat', 'varname') tries to fin...
alrededor de 20 horas hace | 0
| aceptada
How to split the last 4 elements in a column into a new column?
I'm not sure why you want to do this, or what you intend to do with the results, but here is one possible way using a cell array...
alrededor de 22 horas hace | 0
How to use if/then to assign a year to a set of dates?
table_a = readtable('https://www.mathworks.com/matlabcentral/answers/uploaded_files/1286455/Data1.xlsx') table_a.date = datetim...
1 día hace | 0
| aceptada
How can I plot this date time graph?
load('Years.mat') whos Climatology t = Climatology.TimeSeries + hour(Climatology.HourSeries); scatter(t, Climatology.HeightS...
2 días hace | 0
Plot path of a aicraft by plot3
t_start = 0; t_end = 100; delta_t = 1; t = t_start:delta_t:t_end; x = zeros(size(t)); y = zeros(size(t)); z = zeros(size(t...
2 días hace | 0
| aceptada
Get all row indices where values of to columns reach their maximum
A = [1 2 3; 1 4 3; 2 4 3; 1 4 2]; m = max(A(:,2:end), [], 1) Output = find(all(ismember(A(:,2:end), m), 2))
5 días hace | 1
| aceptada
problem with if cycle to determine the datetime
The time returned by datetime('now') will be changing as your code runs, so it seems almost impossible that your if condition wi...
5 días hace | 0
| aceptada
how to create matrix c, where first column is vector a, and the last column is vector b without a loop
a = [1;2;3;4;5]; c = [a a+1 a+2 a+3] If you are a beginner in using Matlab, I would suggest taking a couple of hours to go ...
5 días hace | 0
How do i fix the output of my code?
a=rand(2,2) c=1; cmax=2; r=1; rmax=2; while r<=rmax while c<=cmax a(c,r)=round(a(c,r),2); % a(c,r)*100; << y...
7 días hace | 0
| aceptada
Creating Plot with 2 Y-Axis
No there is no way to do that without some manual coding (if only on the command line). But it isn't hard. Here's a simple exam...
13 días hace | 0
Force 0 tick to appear in a scatter plot
clc, clear, clf n = 0:10; f = n.^2; scatter(n,f, 'k', 'filled') xlim([-1,11]), ylim([-10,120]) ax = gca; ax.XAxisLocation =...
13 días hace | 1
| aceptada
Logical operator not evaluating correctly
I would do this in separate steps. X = randi([-20, 20], [1 15]) Y = zeros(size(X)); Y(X < -5) = -1; Y(X > 5) = 1
13 días hace | 0
Why are tick marks only on one axis when I change the tick spacing?
Try yticks(-4:0)
14 días hace | 2
| aceptada
Find exceeds array ERROR
One obvious problem with this code is where you try to access pairs(pr,2) but pairs is a one dimensional (4x1) vector. Perhaps ...
16 días hace | 0
| aceptada
one time pad plus randstream
Assuming that the random part of the algorithm is generating the code character vector as you said in one of your comments, some...
19 días hace | 0
| aceptada
how to get no of samples?
If you want a specific number of samples between two endpoints, use linspace instead of the colon operator: n = linspace(9.45, ...
20 días hace | 1
Trying to generate subplot figure
It looks like you have created a variable named figure. Type the following command at your command prompt: which -all figure ...
28 días hace | 0
| aceptada
Save generated text file to user specified path
You can use uigetdir to open a dialog and allow the user to browse for the folder in which to save the file. Read the documenta...
28 días hace | 1
| aceptada
Syntax for pyrunfile with multiple output variables?
This is the way to do that (note that ["A" "B"] is a string array as specified in the documentation for that argument): [A, B] ...
30 días hace | 0
| aceptada
Syntax for pyrunfile with multiple output variables?
Did you try this? [A, B] = pyrunfile("pytorch_model.py", ["A" "B"], X=Xpy, y=ypy) Note that ["A" "B"] is a string array as spe...
30 días hace | 0
How to shift experimental data (not a function) in a loglog plot?
Instead of adding an offset, multiply to shift the data. I used a factor of 10 as an example. x = [0.015 0.02 0.05 0.1 0.2...
alrededor de 1 mes hace | 1
| aceptada
Floating-Point to Fixed-Point Conversion of IIR Filters
The Name=Value syntax for name/value pairs of function arguments only works in r2021a and above. So, changing this: biquad = d...
alrededor de 1 mes hace | 0
| aceptada
The Y(:,81) changes linearly with respect to T, I want to modify my code in such a way that when Y(:,81) reaches 2.5E-6 then after that it remains constant through out with T.
Over 100 lines of code to draw a straight line? This plot (with the maximum Y limit applied) can be made in 8 lines of code: T...
alrededor de 1 mes hace | 0
How can I write the coordinates of this geometry?
You don't need a loop. h = 10; th = linspace(pi/2, -pi/2, 100); R = (h/4); %or whatever radius you want x1 = R*cos(th) ; y...
alrededor de 1 mes hace | 0
| aceptada
need script to create a block scenario
If you only want to draw a 3x3 grid of 1x1 squares this is pretty easy (see below). If you want the 0.75x0.75 and 0.5x0.5 squar...
alrededor de 1 mes hace | 0
How to approximate float function by integer numbers?
I'm assuming you want to replace the floating point calculation with an integer one? I'm not sure how that is going to "spare s...
alrededor de 2 meses hace | 1
| aceptada