Community Profile

# Les Beckham

Last seen: Today Active since 2013

Many years developing flight control algorithms and software

All

#### Content Feed

View by

Plot functions in MATLAB
Since I don't have the Statistics and Machine Learning Toolbox (for the unifrnd() function), I used the base Matlab function ran...

1 month ago | 0

| accepted

Creating a sound with certain obtained frequencies
Try this. Since you didn't provide f0 in your example code, I just picked some frequencies. Also, I changed to a fixed output ...

2 months ago | 0

How to separate plot titles on single line? [solved]
Try this: title(sprintf('%s %s %s %s %s %s', head, neck, helmet, impact, energy, rep);

3 months ago | 0

How to know what toolboxes and or functions my code in appdesigner is using?
Try this: matlab.codetools.requiredFilesAndProducts('top_level_function.m'); I know this works with regular functions. Not so...

3 months ago | 1

| accepted

How to make rotate the circular pattern of balls in a while loop?
I think you are very close to what you want. All I had to do to make this animate is to comment out the `hold on` line and incr...

3 months ago | 0

| accepted

"s" in Numerator in First-Order Filter
Use a transfer function block

4 months ago | 0

What's wrong whith my schedule ?
There are several things wrong with this code. First while E~=0,2 is not valid Matlab syntax. Replace the , with a . if you...

5 months ago | 0

Turning a 2x80 to an 80x80
It really depend on how you want to expand the matrix. If I understand what you want, you could try something like this: initi...

5 months ago | 0

Proper usage of GoTo to avoid infinite loop
It appears that you are attempting to create a recursive algorithm. If so, replace "%JUMP TO RUN DIESEL GENERATOR!!!" with anot...

6 months ago | 0

How to add animatedline to formatted figure?
From what you have posted, you have explicitly requested a new figure with the line: figure(); This will create a new figure a...

6 months ago | 1

| accepted

Enter the following variables: a= 123456, b=31/4 , c=cos(π/8). Now calculate
You really should go through the lessons in the Matlab Onramp tutorial if you don't understand how to do these very basic things...

6 months ago | 1

Only gu values tu ?
To test for integer values of double numbers (doubles are the default numeric type in Matlab), I would suggest using mod(m,1). ...

7 months ago | 0

hello everbody hahzu contain
Your code does what you want if you pass it a character array. For example if you pass '11', you get 3 as a result. Note the si...

7 months ago | 1

How to invert a Transfer function in Simulink?
Transfer functions are not allowed to have a higher order in the numerator than in the denominator (more zeros than poles). Thi...

8 months ago | 0

| accepted

Getting values from balance into matlab
Try this: number = sscanf(a, '%*c %*c %f%*c'); The * characters tell sscanf to ignore (not return) those fields. You can lear...

8 months ago | 0

How would I add a label to a variable?
Without extra toolboxes, and assuming that you are programming your 'converter' as a function and you wish to print the results ...

8 months ago | 0

How to print mathematical equations in menu
I expect that what you want is not as simple as this, but as an initial guess at what you are looking for, try this. I don't be...

9 months ago | 0

How to make my code more concise and efficient ?
I suggest using cell arrays. See documentation here: https://www.mathworks.com/help/matlab/ref/cell.html Replace "_cty1" with {...

9 months ago | 0

| accepted

error in plotting clipped sinewave
Your problem is that y is not a vector. In the case of your posted code, y will be the value that it is set to on the last pass...

9 months ago | 1

| accepted

code is not 'return'-ing
return does not mean 'restart'. return in the context of a script actually means 'abort' or 'return to the command line and sto...

9 months ago | 0

| accepted

Create x and y vectors?
Try this: delta = 2; % dx, dy increment N = 10; % desired number of points x = 1:delta:delta*N; y = 1:delta:delta*N'; % tran...

10 months ago | 0

| accepted

How to use a Loop to repeat two equations using the previous answers as the new variables.
This shows how to do the iteration using indexing and a loop instead of typing out each iteration manually: I'm not sure that t...

10 months ago | 0

| accepted

Solved

Pizza!
Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.] Non-scor...

10 months ago

How can one extract a column based on a value of another column?
>> A = [ 0 1; 1 0; 0 2]; >> A_0 = A(A(:,1)==0,2) A_0 = 1 2 >> A_1 = A(A(:,1)==1,2) A_1 = 0

1 year ago | 0

How to reduce decimal point in .dat file?
For your two alternative ways of saving this data into a text file, try the following two options. Please read the documentatio...

1 year ago | 0

| accepted

Hex to binary character array
This string is way too long to be converted to a decimal (or binary) number directly. It is actually 100 hex digits long (not 1...

1 year ago | 1

| accepted

using fget1 to read text file. Need help sorting data
The link that Walter provided looks promising. If you wish to pursue the processing on your own, here is a script that will rea...

1 year ago | 1

| accepted