
Les Beckham
Many years developing flight control algorithms and software
C++, C, C#, MATLAB, Assembly
Professional Interests:
Statistics
RANG
169
of 273 013
RÉPUTATION
644
CONTRIBUTIONS
2 Questions
241 Réponses
ACCEPTATION DE VOS RÉPONSES
50.0%
VOTES REÇUS
86
RANG
of 18 442
RÉPUTATION
N/A
CLASSEMENT MOYEN
0.00
CONTRIBUTIONS
0 Fichier
TÉLÉCHARGEMENTS
0
ALL TIME TÉLÉCHARGEMENTS
0
CONTRIBUTIONS
0 Publications
CONTRIBUTIONS
0 Public Chaîne
CLASSEMENT MOYEN
CONTRIBUTIONS
0 Point fort
NOMBRE MOYEN DE LIKES
Content Feed
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...
3 jours il y a | 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 =...
3 jours il y a | 1
| A accepté
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
3 jours il y a | 0
Why are tick marks only on one axis when I change the tick spacing?
Try yticks(-4:0)
4 jours il y a | 2
| A accepté
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 ...
6 jours il y a | 0
| A accepté
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...
9 jours il y a | 0
| A accepté
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, ...
10 jours il y a | 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 ...
18 jours il y a | 0
| A accepté
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...
18 jours il y a | 1
| A accepté
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] ...
20 jours il y a | 0
| A accepté
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...
20 jours il y a | 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...
24 jours il y a | 1
| A accepté
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...
26 jours il y a | 0
| A accepté
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...
26 jours il y a | 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...
30 jours il y a | 0
| A accepté
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...
environ un mois il y a | 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...
environ un mois il y a | 1
| A accepté
How do you create a plot of a function using fplot?
Maybe you want ezplot instead of fplot. Your anonymous function definition syntax is wrong as well. Try this: f = @(t) 5*t.^2...
environ un mois il y a | 0
How to Set Up If/Else Statement with Condition of Seeing if Item in Structure Array is a Table
I suggest the istable function. Documentation is here
environ 2 mois il y a | 0
| A accepté
I want to open a tab-delimited XY text file in matlab, use the numerical values of the XY columns to create a matrix and plot the signal.
T = readtable('https://www.mathworks.com/matlabcentral/answers/uploaded_files/1230202/220812_WT_MO_H134R_EA_1391%20015.txt') sc...
environ 2 mois il y a | 1
adding a colormap('jet') to my grapgh please help me
center=[0,0]; %Defining the center of circle ((origin)) %Plotting the first circle at different radius and here i choose from ...
environ 2 mois il y a | 0
A table of s versus t.
r=9; omega=100; b=14; t = linspace(0, 0.01, 20) % <<< use linspace instead to generate your t vector % remove the (t) on the...
environ 2 mois il y a | 0
Sorting a string according to the values of a vector of type double
It should be as simple as this unless I misunderstand what you are expecting. A = [1.1 2.3 4.4 2.3 5.1]; vegetables = {'carrot...
environ 2 mois il y a | 0
| A accepté
two while loops running at same time
You can't code them as separate loops and have them run "at the same time". Depending on how you want the timing to work, you s...
environ 2 mois il y a | 1
Why a condition like If (~Input) changes to a complex condition with ternary operator ?
So, the original condition if (~Input) is C code and not Matlab code? If so, you should use the logical not operator which is !...
environ 2 mois il y a | 0
Using the listdlg function
You probably just need to wrap your switch/case processing in a for loop. For example: s = listdlg('ListString', {'One', 'Two'...
environ 2 mois il y a | 1
| A accepté
anticlockwise points coordinates sorting
A = [0 0 ; 1 0.2; 0 1 ; 0 0.6; 1 0 ; 1 1 ; 0.6 1; ...
2 mois il y a | 1
| A accepté
How to use subplot in a UIFIGURE?
When you post a question that states that you are getting error(s), you should post the complete text of the error message (ever...
2 mois il y a | 0