# William Alberg

**Statistics**

RANK**1 180**

of 250 261

REPUTATION**40**

CONTRIBUTIONS

**4** Questions

**15** Answers

ANSWER ACCEPTANCE **
75.0%
**

VOTES RECEIVED**4**

RANK

of 17 386

REPUTATION**N/A**

AVERAGE RATING**0.00**

CONTRIBUTIONS**0** Files

DOWNLOADS **0**

ALL TIME DOWNLOADS**0**

CONTRIBUTIONS**0 Posts**

CONTRIBUTIONS**0** Public Channels

AVERAGE RATING

CONTRIBUTIONS**0** Highlights

AVERAGE NO. OF LIKES

**Content Feed**

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 ett år ago | 0

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

mer än ett år ago | 0

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

mer än ett år ago | 1

| accepted

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

mer än ett år ago | 0

| accepted

how to get this in smulink

There is a block called "Magnitude Squared", that does exacly that.

mer än ett å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...

mer än ett år ago | 0 answers | 0

### 0

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

mer än ett år ago | 1

| accepted

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

mer än ett å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 ...

mer än ett år ago | 1 answer | 0

### 1

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

mer än ett år ago | 1

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

mer än ett år ago | 0

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

mer än ett år ago | 0

| accepted

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

mer än ett år ago | 0

| accepted

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

mer än ett år ago | 0

| accepted

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

mer än ett år ago | 0

| accepted

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

mer än ett år ago | 0

| accepted

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

mer än ett å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 ...

mer än ett år ago | 1 answer | 0

### 1

answerQuestion

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

mer än ett år ago | 2 answers | 0