A résolu


Calculate a Damped Sinusoid
The equation of a damped sinusoid can be written as |y = A.ⅇ^(-λt)*cos(2πft)| where |A|, |λ|, and |f| ...

presque 2 ans il y a

A résolu


Solve a System of Linear Equations
Example: If a system of linear equations in x₁ and x₂ is: 2x₁ + x₂ = 2 x₁ - 4 x₂ = 3 Then the coefficient matrix (A) is: 2 ...

presque 2 ans il y a

A résolu


Find the Oldest Person in a Room
Given two input vectors: * |name| - user last names * |age| - corresponding age of the person Return the name of the ol...

presque 2 ans il y a

A résolu


Convert from Fahrenheit to Celsius
Given an input vector F containing temperature values in Fahrenheit, return an output vector C that contains the values in Celsi...

presque 2 ans il y a

A résolu


Calculate Amount of Cake Frosting
Given two input variables r and h, which stand for the radius and height of a cake, calculate the surface area of the cake you n...

presque 2 ans il y a

A résolu


Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

presque 2 ans il y a

Réponse apportée
Display of nodal values of a matrix
You can use patch and text functions: nrRow = 4; % number of rows nrCol = 6; % number of columns recW = 0.5;% rectangle wid...

presque 2 ans il y a | 0

A résolu


Divisible by 2
This is the first problem in a set of "divisible by x" problems. You will be provided a number as a string and the function you ...

presque 2 ans il y a

Réponse apportée
Two sets of data with two date ranges and y-axis values
Something like this maybe: % create dummy time and data vectors t1 = datetime(2013,11,1,8,0,0); % define random start of time ...

presque 2 ans il y a | 0

Réponse apportée
How to write theta - theta bar as a axis label
scatter(1:10,rand(1,10) , "Filled"); grid on xlabel('$\theta$ - $\bar{\theta}$','interpreter', 'latex')

presque 2 ans il y a | 1

| A accepté

Réponse apportée
Plotting functions of more than one variable, f(x,y)
A simple code: y = -20:0.001:20; % define y y(y==0) = []; % remove y == 0 for to prevent division by zero in x2 equation x1...

presque 2 ans il y a | 0

Réponse apportée
How to plot multiple saved figures as .fig into a single figure?
Check this answer, I think it will be helpful for you.

presque 2 ans il y a | 0

| A accepté

Réponse apportée
How to calculate the difference error between Runge-Kutta Order 4 Method and euler method?
You can add a 'eul' function for euler integration and take the norm of the difference between the resulting outputs. clear all...

presque 2 ans il y a | 0

| A accepté

Réponse apportée
Assemble Global Stiffness Matrix
I think this is what you are looking for. You can extend the logic in a better way if you have more than 3 nodes. % create rand...

presque 2 ans il y a | 1

Réponse apportée
Add a red line on the graph
If you want to put a vertical line on an x value, you can also use plot(0:0.01:2*pi,sin(0:0.01:2*pi)) % random plot xline(3,'r...

presque 2 ans il y a | 0

Réponse apportée
Good day, I need help in building a reference signal from an ISO Specification. I have tried "create signal app"; however, it does not help much.
Something like this maybe clc tInit = 2; % initial Ub duration tFin = 2; % final Ub duration tr = 0.2; t6 = 0.4; t7 = 0.7;...

presque 2 ans il y a | 1

| A accepté

Réponse apportée
Numerical precision in subtracting two almost identical variables?
Here is your answer link Its all in the low level things. If you display your values with 'format hex', you will see they diffe...

presque 2 ans il y a | 0

Réponse apportée
Solution of Growth problem
You overwrite the y0 and t variable within the function with this code: y0 = [100; 300; 500; 125; 100; 200]; t = 3; So the u...

presque 2 ans il y a | 2

Réponse apportée
Creating multiple cylinders in different coordinates
Not sure how you want them to look or what you need but here is one simple way [X,Y,Z] = cylinder(2); % create X,Y,Z coordinate...

presque 2 ans il y a | 0

Réponse apportée
How to write test case for mil and sil testing
This is a realy broad question without any specifics. I would check the Mathworks page to learn more where they provide examples...

presque 2 ans il y a | 0

Réponse apportée
Defining and calling functions in MATLAB
So if you want to define them in a single script, the function needs to be at the bottom. And as others mentioned you might wan...

presque 2 ans il y a | 1

Réponse apportée
Plotting 2 x-axes against 1 y-axis
I think this is what you are looking for, see the example for Display Data with Multiple x-Axes and y-Axes

presque 2 ans il y a | 0

Réponse apportée
How to optimize a parameter, influencing the dynamic response of a control system
Here is a brute force way: desired_ratio = 4; Kc_vec = 0.1:0.01:10; % Kc search range ratio = NaN(size(Kc_vec)); % initiali...

presque 2 ans il y a | 2

Réponse apportée
Calculate number of sprints based on sprint and time data
Based on another answer here, find below a solution: clear ,clc Fs = 1e3; % sampling rate dt = 1/Fs; t = 0:dt:100; % t...

presque 2 ans il y a | 1

| A accepté

Réponse apportée
How to make a sequence of time and the corresponding data from a data set where time is not provided sequentially
You cannot fill the gaps in your data without physically taking more data or interpolating. However if your problem is to order...

presque 2 ans il y a | 1

| A accepté

Réponse apportée
How to display the values of a Stateflow local data during simulation.
I think this is what you are looking for. Essentially you define the variable in your stateflow as a logged data (from Property...

presque 2 ans il y a | 0

Réponse apportée
Transfer function extraction from frequency response
First of all, bode command does not give you numerator and denominator. It gives you magnitude and phase of the system, or FRD i...

presque 2 ans il y a | 0

Réponse apportée
vectorized operations on symbolic functions
Yet another method, you can define your symbolic parameter as a matrix symbolic n = 500; X = sym('X', [500 3]); % I assume ...

presque 2 ans il y a | 0

Réponse apportée
c2d transformation from s domain to z domain
For forward Euler method, plug in s = (z-1)/T where T is your sampling time For backward Euler method, plug in s = (1-z^(-1))/T...

presque 2 ans il y a | 0

Réponse apportée
Why is my code returning incorrect result?
You might wanna provide the equations yu are trying to implement. Otherwise, unless someone is already familiar with the equatio...

presque 2 ans il y a | 0

| A accepté

Charger plus