Community Profile

photo

William Alberg


Last seen: ungefär 3 år ago Active since 2020

Followers: 0   Following: 0

Statistics

All
  • Thankful Level 2
  • Introduction to MATLAB Master
  • 3 Month Streak
  • Solver
  • Knowledgeable Level 2
  • First Answer
  • Thankful Level 1

View badges

Feeds

View by

Answered
Taking values from a Matrix and Inputting into an equation, using Loops
Hello Omar If you want to replace "y" with one of the values in "A", you can do it the following way: A = 1:7; syms x y eq...

mer än 3 år ago | 0

Answered
Hello, I'd like to define this function. Any help please?
Im not entirely sure if this is what you are looking for. syms x u = @(x) func(x) function y = func(x) if 1 <=...

nästan 4 år ago | 0

Answered
For loop problem for automatisation
My error code is: Index in position 2 exceeds array bounds (must not exceed 5). Error in main (line 17) y = matriceVal...

nästan 4 år ago | 1

| accepted

Answered
plot all the values of a for loop
As far as i can see, you need to put the plot command inside the loop. I have attached a modified version

nästan 4 år ago | 0

| accepted

Answered
how to get this in smulink
There is a block called "Magnitude Squared", that does exacly that.

nästan 4 år ago | 0

Question


Transform polynomium equation into multiple coefficient equations
Hello I want to match coefficients from 2 polynomiums: syms x syms a [3,1] syms alpha beta gamma eq = (1-alpha)*x^2 + (1...

nästan 4 år ago | 0 answers | 0

0

answers

Answered
How to count the number of "" true "" and ""false"" in matrix
You can do something like this: a = [ true true false true true true true true false false true false false true true ] ...

nästan 4 år ago | 1

| accepted

Answered
How can i vectorize this loop?
@Rik told me to move my comment to the answer section, i hope he ment copy-paste :) I don't know if you can vectorize that, sin...

nästan 4 år ago | 0

Question


Simulink: Product block forces wrong dimension size
Hello all I have a bit of a problem. My simulink model has an dimension error, but i cant understand why. I need to perform ...

nästan 4 år ago | 1 answer | 0

1

answer

Answered
linear equation without coefficients
I think the polyfit command is what you are looking for. It should work like this k = polyfit(x,y,1) a = k(1) b = k(2)

nästan 4 år ago | 1

Answered
Create Matrix using only zeros and ones
This should do it for the first matrix A = zeros(4,4); A(:,1) = 1; % set column 1 to 1 A(:,3) = 1; % set column 3 to 1 disp(...

nästan 4 år ago | 0

Answered
How to put rows of a matrix in another matrix column?
data = rand(243938,1); % generate test data n = 2; % Columns in Y Y = nan(100,n); % initiate Y % method 1, using forloo...

nästan 4 år ago | 0

| accepted

Answered
STORAGE OF SELECTIVE VALUES OF SOME CELLS INTO A SINGLE MATRIX FROM TWO DIFFERENT MATRICES. Whats wrong with this?
Okay, you have made 2 errors: A(:,1) returns: [1;6;1;8;5]. I think you want it to return [1, 2, 3, 4, 5], which is A(1,:). "A...

nästan 4 år ago | 0

| accepted

Answered
Specifying a range in a double
I think, that you want to do this: MAX = 110; MIN = 90; id = find( (MIN <= Values) & (Values <= MAX) ) Values = mean(Values(...

nästan 4 år ago | 0

| accepted

Answered
Help with a loop
S = [12 4 6 4;16 12 2 3;0 4 10 12;4 12 21 3]; CLN = 50*ones(4); for i = 1:4 S = S - 2; CNL_new = CLN; % If S is bel...

nästan 4 år ago | 0

| accepted

Answered
Transforming from Maclaurin to Taylor
If i understand correctly, your code looks something like this: syms x f(x) = x^3 + x^2 + x +1 f(x-1) f(x-2) And you want...

nästan 4 år ago | 0

| accepted

Answered
differential equation solution for control system
The transfer function can be inserted into matlab the following way: % make transferfunction b = 1; a = [1 5 6 10]; G = tf(b...

nästan 4 år ago | 1

Question


Define alternative latex-output for symbolic
Hello I want to change the output that comes from the latex-command syms g(f) dx(t) d eq = dx(t) == g(t^2+t) + d; % example ...

nästan 4 år ago | 1 answer | 0

1

answer

Question


Apply diff to function handle
Hello! I have a string input that i transform into a symbolic equation. I need to translate "D(___)" into differentiation, but ...

nästan 4 år ago | 2 answers | 0

2

answers