Réponse apportée
Not enough input arguments
How do you call this function? You need input arguments when running it (you can't press F5 or something similar). You co...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
Help with Basic 2D Contour Plot
Follow the instructions from Friedrich, but flip the matrix around before you plot it. Now, Z(1,1) is in the origin, Z(1,2)...

plus de 12 ans il y a | 0

Réponse apportée
Help with Basic 2D Contour Plot
Will this work for you? q = zeros(4); for s=[0:1:3], for t=[0:1:3], q(t+1,s+1)=triarea(s,t) end...

plus de 12 ans il y a | 0

Réponse apportée
how can I create a vector with unknown length?
The most intuitive (and simple to implement) is probably bubble sort: <https://en.wikipedia.org/wiki/Bubble_sort> Since th...

plus de 12 ans il y a | 1

Réponse apportée
How to shift the origin or how to make median of the data to be origin or zero?
Do you just want to substract the median value? In that case: cc = aa-median(aa); Now the median of cc = 0. Hope it h...

plus de 12 ans il y a | 0

Réponse apportée
matrix manipulation and components
Is this what you're asking for? A(A>3.1) - Rob

plus de 12 ans il y a | 2

| A accepté

Réponse apportée
How create serial RLC circuit in Simulink?
It looks as though your intial conditions are 0 for both integrators. Are you supposed to simulate the system in steady-stat...

plus de 12 ans il y a | 0

Réponse apportée
traversing a long matrix
I think this should work ind = find(A(:,1) == A(:,2)); - Rob

plus de 12 ans il y a | 0

| A accepté

Question


Strange results from tic / toc.
I'm checking the running time of a function using tic/toc. I write the following in the command window (and execute it simultane...

plus de 12 ans il y a | 1 réponse | 1

1

réponse

Réponse apportée
Filling vector with a condition.
Like this? A = [1 2 -3 0 4 0 -5 0 6]; B = 10:19; C = zeros(1,length(A)); C(A>0) = B(A>0) C = ...

plus de 12 ans il y a | 2

Réponse apportée
I can correct the error. Help me please!!
This should work: [X,Y] = meshgrid(x,y); f = sin(power(X,2)-power(Y,2)) Hope it helps =)

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
How to determine the position of an integer
If you want to use the |find| function: pos = find(d==3);

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
How to get the desired frequency in simplified synchronous machine?
The electrical frequency is, as stated in the comments: f_elec = poles * f_mec / 2 I was wondering what you were doing, ...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
??? Subscript indices must either be real positive integers or logicals.
Is this what you're trying to do? %% Don't run this part A = magic(4); %% Run this part by itself x = 0.8; f ...

plus de 12 ans il y a | 0

Réponse apportée
My input video is in the format of mp4. Does matlab supports this file format?
Should be unnecessary to ask this question in a forum. You can google these things very easily. The answer is yes. <http:/...

plus de 12 ans il y a | 0

Question


Finding the indices of all edges within k steps from a chosen line in an adjacency matrix
I have a function where I can find all nodes k number of steps from any initial set of nodes in a sparse adjacency matrix. Norma...

plus de 12 ans il y a | 1 réponse | 0

0

réponse

Réponse apportée
trying to right code to generate matrix for three different frequency
w = [100 200 400]; A = zeros(2,2,3); B = zeros(1,2,3); C = zeros(1,2,3); for i = 1:3 A(:,:,i) = [0 1;...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
Undefined function or variable 'in'.
Well the reason is that you haven't defined 'in' anywhere. My guess is that the input variable should be named 'in'. You hav...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
function performance, same functions has very different speed
I believe this is due to the way matrices are stored in Matlab. A matrix is stored column-wise, as below: A = [1 2 3;4 ...

plus de 12 ans il y a | 0

Réponse apportée
How to generate a system of four equations in four unknows to be solved in a matrix?
If you are familiar with solving linear equations on matrix form by hand, you start of the same way: A*x = b, where b = the v...

plus de 12 ans il y a | 0

Réponse apportée
Finding all edges (and nodes) within X steps from a chosen line in an adjacency matrix
I have found a good answer to my question above (Thanks to Dr_Sam!). 1: Add 1 on the diagonal of the matrix A. 2: Build a...

plus de 12 ans il y a | 1

| A accepté

Question


Finding all edges (and nodes) within X steps from a chosen line in an adjacency matrix
I have a nx2 matrix of to-from nodes for a large network structure. I have used this to create a sparse adjacency matrix which I...

plus de 12 ans il y a | 1 réponse | 0

1

réponse

Question


How to graph a connectivity/adjacency matrix?
I want to graph the structure of a network (a power grid). I have a list containing to-from nodes for each branch. The BIOGRA...

plus de 12 ans il y a | 1 réponse | 0

1

réponse

Réponse apportée
Start matlab on windows 8
If Matlab is installed, and unless your computer is acting up, this should work: 1. Press the windows button, (to enter the s...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
How do I create a vector with the first day of each month?
Not quite sure what you are asking for here. I assume you have a vector with all days from Monday-Sunday, and you know which...

plus de 12 ans il y a | 0

| A accepté

Question


Calculating parts of the sparse matrix inverse
I have a sparse symmetric matrix H, containing on average 4 non-zero elements per row/col, and a sparse vector M with only two n...

plus de 12 ans il y a | 1 réponse | 1

1

réponse