Answered

Modify value of DC voltage source during a simulation

use "controlled voltage source" instead of DC voltage source. connect your look up table to it and it will do it.

Modify value of DC voltage source during a simulation

use "controlled voltage source" instead of DC voltage source. connect your look up table to it and it will do it.

2 maanden ago | 1

Answered

Solving differential equation in simulink

hello again. this should look like this: by clicking on "Tune" an app opens and tries to first linearize the system and the...

Solving differential equation in simulink

hello again. this should look like this: by clicking on "Tune" an app opens and tries to first linearize the system and the...

2 maanden ago | 0

| accepted

Answered

Find the value x

you can rewrite the equation in the form of "x^(1/x) = exp(1/exp(1))". this means that if "f(z)=z^(1/z)" then we have "f(x) = f(...

Find the value x

you can rewrite the equation in the form of "x^(1/x) = exp(1/exp(1))". this means that if "f(z)=z^(1/z)" then we have "f(x) = f(...

3 maanden ago | 2

Question

my differential equation general solution form requires very high or low values, exceeding double precision capability, while I know its solution is finite

as a brief explanation, I'm trying to solve a first order bessel equation which is part of a more complicated PDE problem, whose...

3 maanden ago | 0 answers | 0

Question

fastest way to apply A\B on each matrix page

I would like to find an efficient fast way for calculating: for i = 1:n X(:,:,i) = A(:,:,i)\B(:,:,i) end where A and B are 1...

3 maanden ago | 1 answer | 0

Answered

negative continuous position on vector

how about: k = find(logical(A)); n = length(A); B = 1-k:n-k A = 0 0 0 0 1 0 0 0 B = ...

negative continuous position on vector

how about: k = find(logical(A)); n = length(A); B = 1-k:n-k A = 0 0 0 0 1 0 0 0 B = ...

3 maanden ago | 1

Answered

Simulink Electrical Op Amps

your method is correct. this image shows a model that has been tested. what is the problem exactly? any error?

Simulink Electrical Op Amps

your method is correct. this image shows a model that has been tested. what is the problem exactly? any error?

3 maanden ago | 0

Question

how to make symbolic computations fast?

hello, I'm working on some calculation that requires great precision at very large or small values. as I have searched the only...

3 maanden ago | 2 answers | 0

Answered

Loading a cell array (string) with different lengths into a for loop

you don't even have to concatenate them to one "control" cell array. I suggest create an array called folder where each element ...

Loading a cell array (string) with different lengths into a for loop

you don't even have to concatenate them to one "control" cell array. I suggest create an array called folder where each element ...

3 maanden ago | 0

| accepted

Answered

index multiple columns together on different critera

A= [0.09 0.48 0.5 0.1 0.04 0.3]; idx1 = A(:,1)<0.2 ; idx2 = A(:,2)>0.2; B(:,1) = A(idx1,1); B(:,2) = A(...

index multiple columns together on different critera

A= [0.09 0.48 0.5 0.1 0.04 0.3]; idx1 = A(:,1)<0.2 ; idx2 = A(:,2)>0.2; B(:,1) = A(idx1,1); B(:,2) = A(...

3 maanden ago | 0

Answered

I am not able to integrate heaviside(y-f) for x= 0 to pi/2 and y = 0 to pi/2 (only syms integration "int"). After running the code, output is shown in below and i am not able to get the numerical answer. Can you give some ideas on how to proceed?

if you need numerical integration, some functions cannot be easily evaluated by symbolic. instead use "integral". in here we hav...

I am not able to integrate heaviside(y-f) for x= 0 to pi/2 and y = 0 to pi/2 (only syms integration "int"). After running the code, output is shown in below and i am not able to get the numerical answer. Can you give some ideas on how to proceed?

if you need numerical integration, some functions cannot be easily evaluated by symbolic. instead use "integral". in here we hav...

3 maanden ago | 1

Answered

Concatenate x amount of matrices

after a few (or maybe a lot!) thinking, I found the pattern. I used symbolic to specify each element by its name rather than val...

Concatenate x amount of matrices

after a few (or maybe a lot!) thinking, I found the pattern. I used symbolic to specify each element by its name rather than val...

3 maanden ago | 0

Answered

How to extract RGB matrices from stacked TIFF file?

not sure. % A = your matrix after reading the image file im = cell(1,n); for i = 1:N im{i} = A(:,:,:,i) % im{i} = indivi...

How to extract RGB matrices from stacked TIFF file?

not sure. % A = your matrix after reading the image file im = cell(1,n); for i = 1:N im{i} = A(:,:,:,i) % im{i} = indivi...

3 maanden ago | 0

Solved

Determine whether a vector is monotonically increasing

Return true if the elements of the input vector increase monotonically (i.e. each element is larger than the previous). Return f...

3 maanden ago

Solved

Pizza!

Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.] Non-scor...

3 maanden ago

Solved

Triangle Numbers

Triangle numbers are the sums of successive integers. So 6 is a triangle number because 6 = 1 + 2 + 3 which can be displa...

3 maanden ago

Solved

Column Removal

Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2 3; 4 5 6]; ...

3 maanden ago

Solved

Select every other element of a vector

Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...

3 maanden ago

Solved

Determine if input is odd

Given the input n, return true if n is odd or false if n is even.

3 maanden ago

Solved

Find the sum of all the numbers of the input vector

Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...

3 maanden ago

Solved

Make the vector [1 2 3 4 5 6 7 8 9 10]

In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

3 maanden ago

Solved

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

3 maanden ago

Answered

A function that outputs multiple plots?

function plotoutput() x = 1:10; y = x.*x; plot(x,y) when you call the function, it shows a figure.

A function that outputs multiple plots?

function plotoutput() x = 1:10; y = x.*x; plot(x,y) when you call the function, it shows a figure.

3 maanden ago | 0

| accepted

Answered

How to create a loop on matrix

for example suppose we want to multiply each column by its coulmn number: A =[ 92 99 1 8 15 67 74 5...

How to create a loop on matrix

for example suppose we want to multiply each column by its coulmn number: A =[ 92 99 1 8 15 67 74 5...

3 maanden ago | 0

| accepted

Answered

Logarithmic scale with a different base

add the following after plot ax = gca; % current axe ax.XTick = 6:14;

Logarithmic scale with a different base

add the following after plot ax = gca; % current axe ax.XTick = 6:14;

3 maanden ago | 0

Answered

how can i vary the frequency of the signal

A=240; d=6; x=0:1e-4:1; s=x.^3; a=-(s.*d); minfreq = 10; % minimum frequency(Hz) maxfreq = 200; % maximum frequency(Hz...

how can i vary the frequency of the signal

A=240; d=6; x=0:1e-4:1; s=x.^3; a=-(s.*d); minfreq = 10; % minimum frequency(Hz) maxfreq = 200; % maximum frequency(Hz...

3 maanden ago | 0

| accepted

Answered

sum some values of a column based on an other column

% A is the matrix sized: 8784*2 idx1 = A(:,1)==1; idx2 = A(:,1)==2; idx3 = A(:,1)==3; data = A(:,2); sum(data(idx1)) % ...

sum some values of a column based on an other column

% A is the matrix sized: 8784*2 idx1 = A(:,1)==1; idx2 = A(:,1)==2; idx3 = A(:,1)==3; data = A(:,2); sum(data(idx1)) % ...

3 maanden ago | 1

| accepted

Answered

How do you set the first column of a 4x4 matrix = a vector

X = [380 250 220 200] C=[1257 679 220 203 1567 155 234 432 2345 445 238 556]; C(1,:)=X; % set the first row of C equ...

How do you set the first column of a 4x4 matrix = a vector

X = [380 250 220 200] C=[1257 679 220 203 1567 155 234 432 2345 445 238 556]; C(1,:)=X; % set the first row of C equ...

3 maanden ago | 0

| accepted

Answered

no plot appearing for loop

"f" was scalar rather than vector. some constants needed to be defined outside of the loop. and the iteration-depandant variable...

no plot appearing for loop

"f" was scalar rather than vector. some constants needed to be defined outside of the loop. and the iteration-depandant variable...

3 maanden ago | 0