Community Profile

photo

M


272 total contributions since 2017

M's Badges

  • Community Group Solver
  • 24 Month Streak
  • First Review
  • Indexing I Master
  • Leader
  • Matrix Manipulation I Master
  • Knowledgeable Level 3
  • Revival Level 2
  • Commenter
  • Promoter
  • Solver
  • Thankful Level 1
  • First Answer

View details...

Contributions in
View by

Answered
select from matrix!
When executing the command it outputs : b = 3 2 2 1 The command : b= [a(1,2:3);a(2,1:2)] sel...

6 dagen ago | 1

| accepted

Answered
plot standard deviation as a shaded area
You can use the code directly from this answer: https://mathworks.com/matlabcentral/answers/180829-shade-area-between-graphs#an...

12 dagen ago | 0

Answered
How to make a array from a loop?
You can do something like: nb = 1440; j = zeros(1,nb); Z = zeros(1,nb); for i = 1 : nb Z(i) = powerConsumption(i) - sol...

20 dagen ago | 0

Answered
System unit-impulse response for given tau
There is a problem of dimensions for matrix multiplication at line 5 and 6 : x1 = (A/tau1)*exp(t/-tau1) x2 = (A/tau2)*exp(t/-t...

25 dagen ago | 0

Answered
When we use the ";" at the end of a command line and when we do not use it
From https://www.tutorialspoint.com/matlab/matlab_syntax.htm : Semicolon (;) indicates end of statement. However, if you want t...

25 dagen ago | 0

Answered
adding element to a matrix row
You can read this to know about matrix indexing: https://www.mathworks.com/company/newsletters/articles/matrix-indexing-in-matl...

25 dagen ago | 0

| accepted

Answered
Control of inverted pendulum
I don't find anything similar in literature LQR algorithm with state estimator is very common and you can find plenty of exampl...

27 dagen ago | 0

Answered
Find elements in a matrix
You can get the indices with: idx = A >= 30 & A <= 65 To know the number of values corresponding to the condition: numel(find...

ongeveer een maand ago | 0

Answered
Is there any maximum for the size of matlab table?
It depends on what you want to store into this table. You can have a look here to find more informations: https://mathworks.com...

ongeveer een maand ago | 0

Solved


Find the maximum number of decimal places in a set of numbers
Given a vector or matrix of values, calculate the maximum number of decimal places within the input. Trailing zeros do not coun...

ongeveer een maand ago

Answered
function rand with variables
You can use something like this, adapt it to your case: a = 1; b = 2; c = 3; A = [a b c]; nb = 10; vec = zeros(1,nb); for...

ongeveer een maand ago | 0

Solved


Check that number is whole number
Check that number is whole number Say x=15, then answer is 1. x=15.2 , then answer is 0. <http://en.wikipedia.org/wiki/Whole...

ongeveer een maand ago

Answered
('tf' requires one of the following) "tf commend is not working" HELP PLS!
Your code is right, but you do not have the required toolbox. The function tf is part of the 4 toolbox listed in the error messa...

ongeveer een maand ago | 1

| accepted

Answered
Any methods to solve optimal control indirect method such as Pontryagin Minimum Principle?
Hi, here are some related questions to start with: https://mathworks.com/matlabcentral/answers/440335-how-to-implement-optimal...

ongeveer een maand ago | 0

Answered
Vectors must be the same length.
What lines causes the error ? Following one ? g = plot(t,delta_omega_laser ); t and delta_omega_laser must have the same leng...

ongeveer een maand ago | 0

| accepted

Answered
assign variable name to Function Output Variables
Why don't you just change [wave_rms]=waveform(wave) into [Uph_rms]=waveform(wave) ?

ongeveer een maand ago | 0

Answered
Taking in a function as an argument
How is testfunc defined ? Here is a simple working example: function out = func(inputfunc, constant1, constant2) out = inputf...

ongeveer een maand ago | 0

Answered
How idx runs and give its value ?
abs(a-n) = 1.8000 2.0000 4.0000 6.3000 6.5000 then min(abs(a-n)) = 1.8, and the location of this minimum value...

ongeveer een maand ago | 0

Answered
Servo control without controller
have you tried something so far ? Do you need help to connect matlab and the motor ? In this case you should specify what is y...

ongeveer 2 maanden ago | 0

Answered
plot a defined function
plot the function N(T) versus T in range 0.1 to 14 T is known ? T =[0.1 : 14 ] ? And you want to plot ne(T) ? In this case yo...

ongeveer 2 maanden ago | 0

Answered
Problem with Discrete Controller Design
It could actually be both. It is indeed possible that the discretization with a given frequency brings problems such as oversa...

2 maanden ago | 0

Answered
If the values are almost equal to each other,how do i plot the figure to see its curve? (not straight line )
I am not sure to understand the question, but the following code answer your question ? a=[1 2 3 4]; x=[x1 x2 x3 x4]; % your d...

2 maanden ago | 0

Answered
obsvf confused by documentation
You were right, the documentation for obsvf function has been updated recently: https://mathworks.com/help/control/ref/obsvf.ht...

3 maanden ago | 0

Answered
HOW TO MAKE FUNCTION HANDLING PROPERLY IN DIFFERENT MATLAB FILES?
The way to call functions in matlab is explained here: https://fr.mathworks.com/matlabcentral/answers/179803-calling-a-function...

3 maanden ago | 0

| accepted

Answered
How to take the average of different initial conditions
It is not clear what you want to do from the code you posted, especially the first loop : for j = 1: length (g) ... end ...

4 maanden ago | 0

Answered
Not enough input argumaents
It depends on how you call this function, try to call if from the command window : x = 1; y = 2; s = add(x,y); And then you...

5 maanden ago | 0

Answered
how to find matching elements of two colums vectors
It depends what you want exactly. Let's say you have two vectors a and b: a=[1;2;3;4]; b=[0;2;3;5]; To find the indices wher...

6 maanden ago | 0

Answered
matlab 2014b windows 10
Follow this link and select the matlab version you want to download : https://mathworks.com/downloads/web_downloads/select_rele...

7 maanden ago | 0

Answered
How to caculate a value for a step - the previous step
It depends on what you mean by "I have a value x". It is actuallyquite easy to do for a straightforward example, but it depends...

8 maanden ago | 0

Answered
Restrict user string inputs
The problem comes from your conditions: ~strcmp(y,'i') | ~strcmp(y,'m') This is never true, even if you enter 'i' or 'm'. Wh...

8 maanden ago | 0

Load more