photo

Aquatris


Last seen: 2 jours il y a Actif depuis 2023

Followers: 2   Following: 0

Statistiques

All
  • 6 Month Streak
  • Knowledgeable Level 4
  • Community Group Solver
  • Solver
  • First Answer

Afficher les badges

Feeds

Afficher par

Réponse apportée
Conditionally stop simulation in simulink
You can use the stop simulation block.

1 jour il y a | 0

Réponse apportée
function zpk and linmod
Here explains how it is done. Basically you have your function that describes the relation between states and inputs. If they ar...

2 jours il y a | 0

Réponse apportée
How to calculate Average without receiving 'Inf' as a result.
Here is one way: % create dummy matrix A = rand(100,1); A([5 10 24 55 23 60]) = inf; A([12 56 29 35]) = nan; mean(A) % s...

4 jours il y a | 0

Réponse apportée
writematrix: how to get formatted txt-output?
Use 'tab' delimiter option instead of single space. M = [100 0 4500;0 1 38.29;1 1 38.22]; writematrix(round(M,2),'file.txt',...

19 jours il y a | 0

Réponse apportée
Simulate recursive function in simulink
I did not care about the dimensions at all while creating the simulink model so some adjustment might be necessary but this is o...

22 jours il y a | 0

Réponse apportée
Add NaN in the first row of a table
Assuming all your entries are numeric, since you want to assign NaN, here is one way; % create dummy table Age = [38;43;38;40;...

24 jours il y a | 0

Réponse apportée
Error in displaying the whole matrix
Ther eis probably a 1e6 at the top of the display. You can do 'format bank' to mitigate this if you want or any other format opt...

environ 2 mois il y a | 0

| A accepté

Réponse apportée
How to update a function with output from another function?
Here is one way iff the required variables are within the state vector 'y', then you can do: %% change ode45 call [t, y] = ode...

environ 2 mois il y a | 0

Réponse apportée
slow drawing of a set of points on a plane
In essence for loop are always slower. So try to vectorize your code whereever possible for efficiency, here is a good read. In ...

environ 2 mois il y a | 0

| A accepté

Réponse apportée
plot magnitude data at location (x,y,z)
Here is one way where you use colors to indicate the magnitude; % random data x = [0:pi/50:10*pi nan]; % nan is added to remov...

environ 2 mois il y a | 0

Réponse apportée
Generate the motion (Trajectory) of a sphere (or point) with given velocity value
If you dont care about the actual timing and things, here is one way where the colors of the path indicate the speed and a simpl...

environ 2 mois il y a | 0

Réponse apportée
How to generate vector with non-linear spacing?
The answer from another question here: A = 1; B = 5; std = .9; % need to play with this to get desired shape within desired r...

environ 2 mois il y a | 0

Réponse apportée
Second Order Laplace solving doesn't work ('Unable to find explicit solution')
Not sure the underlying reason behind it but you are defining the X as a function of s and solve function seems to be having tro...

2 mois il y a | 0

| A accepté

Réponse apportée
How do I solve system of differentials using ode45 and eom functions
You defined a symbolic variable within your ode function, which is a nono if you wanna solve it numerically :D function ds = e...

2 mois il y a | 1

| A accepté

Réponse apportée
Solving with ode45 with a solution dependant variable in the ode
No, you should not do it that way. Instead you should create your function properly in a way that represents the equations. It w...

2 mois il y a | 0

Réponse apportée
How to display a color bar in Matlab as shown below
You can call the colorbar function with the desired tick values Z = peaks; contourf(Z) colorbar('ticks',[-6:0.5:8])

2 mois il y a | 1

Réponse apportée
Error in for loop: Index exceeds matrix dimensions.
You have essentially made two mistakes: matrix_f only has 6 rows. You setup up your for loop such that k is 1 2 3 4 5 6 . When ...

2 mois il y a | 0

| A accepté

Réponse apportée
Friend Function implementation in MATLAB
You can use the Access List property. Here is more explanation. Here also.

2 mois il y a | 0

Réponse apportée
how to do rising and falling edge in single signal using signal builder..?
Click on Signal->ReplaceWith or New->Square and play with the points. Alternatively, click on Signal->Custom-> enter your time...

2 mois il y a | 1

| A accepté

Réponse apportée
how to make task in simulink
You can specify sample time of each block seperatly. Here is more information and how to do it for different blocks, subsystems ...

2 mois il y a | 0

Réponse apportée
How to loop through cell array and apply script to each double?
You can use the cellfun function, where you use your script as the function. Example: a = {1:3, 200:205, 10:12}; new_a = cell...

3 mois il y a | 0

A résolu


Find MPG of Lightest Cars
The file cars.mat contains a table named cars with variables Model, MPG, Horsepower, Weight, and Acceleration for several classi...

3 mois il y a

A résolu


Rescale Scores
Each column (except last) of matrix X contains students' scores in a course assignment or a test. The last column has a weighted...

3 mois il y a

A résolu


Crop an Image
A grayscale image is represented as a matrix in MATLAB. Each matrix element represents a pixel in the image. An element value re...

3 mois il y a

A résolu


Verify Law of Large Numbers
If a large number of fair N-sided dice are rolled, the average of the simulated rolls is likely to be close to the mean of 1,2,....

3 mois il y a

Réponse apportée
Unable to obtain double precision from symbolic value
You need the vpa function x = 2; a = sym(1/3); f = a*sin(2*pi*x) fVpa = vpa(f,10)

3 mois il y a | 1

| A accepté

Réponse apportée
Help with contour plot
You actually do have 5 lines but they are on top of each other thats why you do not see them. So your Z matrix for k1(1) and k1(...

3 mois il y a | 0

| A accepté

Réponse apportée
count number of elements for each slice of a vector
Here is one simple way: A = [2 1; 3 1; 4 2; 5 2; 6 2; 7 1; 8 1; 7 1; 5 2; 6 2]; ...

3 mois il y a | 0

| A accepté

Réponse apportée
First cell in a string array is empty, how to replace this?
The issue is you are not initiating and filling the mode1_status matrix properly. Your initial mode1_status matrix is a 1x1 matr...

3 mois il y a | 0

| A accepté

Réponse apportée
Which MATLAB license should I buy as a reseacher working in an NGO?
The best way to know is by contacting the sales directly, say it is a nonprofit NGO and for research. They might offer you eithe...

3 mois il y a | 2

Charger plus