Community Profile

photo

Les Beckham


Last seen: 2일 전 2013년부터 활동

Many years developing flight control algorithms and software

Programming Languages:
C++, C, C#, MATLAB, Assembly

Statistics

All
  • Thankful Level 2
  • 12 Month Streak
  • Knowledgeable Level 5
  • Pro
  • MATLAB Central Treasure Hunt Finisher
  • First Review
  • First Answer
  • Solver

배지 보기

Content Feed

보기 기준

답변 있음
Color in plot from Table
Just a couple of issues. You need column vectors to insert into the table, and you can only have a scalar string or char vector...

1일 전 | 0

답변 있음
Convert C code to Matlab code for reading binary file
Your Matlab struct doesn't match the definition in the C code. For example, the third element is a char array of 100x1000 in th...

2일 전 | 0

답변 있음
Saving a structure array, not fields of it
s1 = struct('a', 1, 'b', 2') save('s1.mat', 's1') % don't use the '-struct' option clearvars whos load('s1.mat') whos Anot...

7일 전 | 0

| 수락됨

답변 있음
Find column number for every row in matrix
A = [ -1 4 1 1 -1 -1 -5 4 -1 ]; [row, col] = find(A > 0) [~,idx,~] = unique(row, 'first...

8일 전 | 0

답변 있음
Plot colored angle between two lines on the YZ plane
This doesn't look exactly like what you want, but should get you started. meta = [14.97, 29.84, 5.61]; meta_plan1 = [15, -10, ...

9일 전 | 1

| 수락됨

답변 있음
I have a problem with butter filter and I can’t fix it
The error was because you were trying to set the cutoff frequency at the Nyquist frequency (half the sample rate). The error me...

9일 전 | 0

| 수락됨

답변 있음
Simple loop with equation problem
Time(1) = [0]; Quantity(1) = 0.2; % Corrected initial condition Xt1 = 0.2; a = 0.5; t = 9; for i=1:t Xt1 = a * Xt1 * ...

10일 전 | 0

| 수락됨

답변 있음
How to use isoutlier based in a part of the data?
It seems like what you are wanting to do is to chop off the "increase at the end". Here is one way to do that by searching back...

16일 전 | 1

답변 있음
reading serial COM port on the fly (weighting scale -> WinPC)
The serial object overload of fopen doesn't have any output arguments, so change that line of code to the following. fopen(p) ...

16일 전 | 0

답변 있음
Plotting different color points based on array values
x = linspace(0, 10); y = sin(x); % test data yhi = y; ylo = y; threshold = 0.5; idxlo = y <= threshold; idxhi = y > thresh...

17일 전 | 1

답변 있음
How to bring a patch to the bottom of a figure?
The code you originally posted already had the lines on top. Just plot the lines after the patch. hold on c = fill([0 4 5 2 1...

17일 전 | 2

답변 있음
Not enough input arguments
Perhaps you have added the control system toolbox since last time this worked? That toolbox contains a function named pid that ...

20일 전 | 0

답변 있음
How do I get the text command to display my character string in one line on a plot?
r = pi; % arbitrary value for testing {'r =' r} % Matlab will put each element of a cell array on a different line in text, tit...

21일 전 | 0

| 수락됨

답변 있음
Using rmoutliers without a for loop
From the documentation of rmoutliers: B = rmoutliers(A) detects and removes outliers from the data in A. If A is a matrix, the...

21일 전 | 0

답변 있음
Significant digits in a matlab figure
plot(rand(1,20)) grid on xtickformat('%.3f')

22일 전 | 0

답변 있음
Convert datetime to numeric - preserve date format
Edited to work with datetime array vs a single datetime. d = datetime(['2023-02-27 14:00'; '2023-02-27 15:00']) % test data - r...

24일 전 | 0

| 수락됨

답변 있음
Intersection of two tables
A = table(); A.user = ["user1";"user2";"user3";"user4"]; A.value = [10;20;30;40] B = table(); B.user = ["user3";"user4";"u...

27일 전 | 0

| 수락됨

답변 있음
How do I plot 5e^(0.5t)sin(2*pi*t)
t1 = 0:10; e = exp((0.5)*t1); num6 = (5).*e.*sin((2)*pi*t1); plot(t1, num6, 'c') grid on You are plotting your exponential ...

27일 전 | 1

| 수락됨

답변 있음
I want to disable a subsystem at time 30 secs where the simulation execution time is 50 secs.How this can be done
I would recommend reading this page in the documentation. You can drive the enable input with the output of a less than block c...

28일 전 | 0

답변 있음
How I would determine if a string contains multiple substrings?
myString = "This has some words in it."; if contains(myString, "This") && contains(myString, "some") disp Yes else d...

28일 전 | 0

답변 있음
How to plot a trajectory with varying colour?
Take a look at this Answer which shows a trick for doing this using surface. https://www.mathworks.com/matlabcentral/answers/50...

28일 전 | 0

답변 있음
why do i get the error using alpha too many output arguments, can anyoen help please.
You get this error because you haven't defined alpha before Matlab tries to execute this line of code CE = DE*cos(alpha); Sinc...

29일 전 | 0

답변 있음
How to solve this matrix equation
Since there are more equations than unknowns, there is no unique solution. A least-squares solution can be found using the \ op...

약 1달 전 | 0

답변 있음
How to add commented description on new scripts
Perhaps this answer will help you do what you want: https://www.mathworks.com/matlabcentral/answers/354093-generate-custom-new-...

약 1달 전 | 0

답변 있음
Move x-axis labels below the axis after relocation
I think we are going to need to see more of your code to figure out what is happening. It seems to work for me (I tried it in m...

약 1달 전 | 0

답변 있음
truncated plot displayed adding the size
figure('DefaultAxesFontSize',16) semilogy([45,45],[10^-5,1],'--r') hold on semilogy([80,80],[10^-5,1],'--r') xlabel ('x','Fo...

약 1달 전 | 0

| 수락됨

답변 있음
How to call bash script in App Designer?
Read the documentation for this command: system

약 1달 전 | 0

답변 있음
Using 'while' loop to check if a file has been added to path
I would actually expect that your while loop wouldn't execute at all, since var.m is a standard Matlab command for calculating v...

약 1달 전 | 0

답변 있음
Shading between two plot lines, then removing the outline
x = 0:0.01:4*pi; % create some fake data to plot y1 = sin(x); y2 = y1 + 0.2*x; figure % hold all % plot(x,y1,'color',[0.8...

약 1달 전 | 0

| 수락됨

답변 있음
How do I align decimal points in a table?
I think I found a solution. Use the Figure Space s = compose('%10.4f', 50*rand(5,1)); snew = cellfun(@(c) strrep(c, ' ', char...

약 1달 전 | 1

더 보기