Many years developing flight control algorithms and software

Answered

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...

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...

24 días ago | 0

Answered

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...

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...

alrededor de 1 mes ago | 0

Answered

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...

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...

alrededor de 2 meses ago | 0

Answered

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...

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...

alrededor de 2 meses ago | 1

| accepted

Answered

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...

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...

alrededor de 2 meses ago | 1

Answered

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). ...

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). ...

3 meses ago | 0

Answered

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...

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...

3 meses ago | 1

Answered

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...

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...

3 meses ago | 0

| accepted

Answered

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...

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...

3 meses ago | 0

Answered

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 ...

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 ...

4 meses ago | 0

Answered

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...

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...

5 meses ago | 0

Answered

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 {...

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 {...

5 meses ago | 0

| accepted

Answered

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...

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...

5 meses ago | 1

| accepted

Answered

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...

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...

5 meses ago | 0

| accepted

Answered

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...

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...

6 meses ago | 0

| accepted

Answered

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...

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...

6 meses 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...

6 meses ago

Answered

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

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

9 meses ago | 0

Answered

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...

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...

9 meses ago | 0

| accepted

Answered

How do I plot a scatter plot where the x is the position of the element in a vector and the y is the value of the element in the vector?

A = [1; 6; 2]; scatter(1:length(A), A);

How do I plot a scatter plot where the x is the position of the element in a vector and the y is the value of the element in the vector?

A = [1; 6; 2]; scatter(1:length(A), A);

10 meses ago | 1

| accepted

Answered

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...

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...

10 meses ago | 1

| accepted

Answered

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...

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...

10 meses ago | 1

| accepted

Answered

What is wrong with this code?

If you are trying to plot the step and impulse responses of your transfer function you need to call step() and impulse() as func...

What is wrong with this code?

If you are trying to plot the step and impulse responses of your transfer function you need to call step() and impulse() as func...

10 meses ago | 0

Answered

How to have a string change based on user input

I've not tried accessing this data source or running your code, but I'm pretty sure that you need to change the following lines ...

How to have a string change based on user input

I've not tried accessing this data source or running your code, but I'm pretty sure that you need to change the following lines ...

10 meses ago | 1

| accepted

Answered

What goes before this?

You can change your 'Stuff =' line to the following: Stuff = sprintf('%s %s is the %d day of the year.', Month,Date,N); Or, yo...

What goes before this?

You can change your 'Stuff =' line to the following: Stuff = sprintf('%s %s is the %d day of the year.', Month,Date,N); Or, yo...

10 meses ago | 0

| accepted

Answered

Changing amount of decimals in between loops

Just index into the vector that you created that specifies the number of places to which you wish to round for that iteration in...

Changing amount of decimals in between loops

Just index into the vector that you created that specifies the number of places to which you wish to round for that iteration in...

11 meses ago | 0

Answered

How can I scope using degrees insted of seconds?

The Simulink Scope block always uses simulation time as the x axis. If you wish to plot two simulation signals against each oth...

How can I scope using degrees insted of seconds?

The Simulink Scope block always uses simulation time as the x axis. If you wish to plot two simulation signals against each oth...

11 meses ago | 1

Answered

"Colon operands must be all the same type, or mixed with real scalar doubles" error I'm trying to run excel file into Matlab function

Well there are several things wrong with this code. You can't use size() to extract things from an array. Replace frq= size(Si...

"Colon operands must be all the same type, or mixed with real scalar doubles" error I'm trying to run excel file into Matlab function

Well there are several things wrong with this code. You can't use size() to extract things from an array. Replace frq= size(Si...

alrededor de 1 año ago | 0

Answered

How to plot phase plane only using trajectory equation?

Try something like this: c1 = 1; % replace with your desired constants c2 = -1; t=linspace(0, 10, 500); % adjust for your ...

How to plot phase plane only using trajectory equation?

Try something like this: c1 = 1; % replace with your desired constants c2 = -1; t=linspace(0, 10, 500); % adjust for your ...

alrededor de 1 año ago | 0

Answered

Sum the digits of a number?

I know it sounds too easy to be true but this manipulation is actually the same as modulo 9. No loops or string conversions need...

Sum the digits of a number?

I know it sounds too easy to be true but this manipulation is actually the same as modulo 9. No loops or string conversions need...

alrededor de 1 año ago | 2