質問

writing a label on every point in scatter plot

is it possibile to write a label text on/near a points in scatter points?

9年弱 前 | 1 件の回答 | 0

質問

disable border blue in scatter plot

I'm building a scatter plot and I would that some points in the plot should be red. scatter(nodes(:,2),nodes(:,3),'filled')...

9年弱 前 | 1 件の回答 | 0

質問

how to debug matlab code

I'm a java programmer and I usually work with netbeans. It gave me the possibility to debug my code. During debbugging, after ha...

9年弱 前 | 1 件の回答 | 1

質問

apply a function to every element of a square matrix

I have a square matrix and I would apply a function to every element of that matrix in the way I get a new square matrix where e...

9年弱 前 | 3 件の回答 | 0

質問

building a matrix starting from another matrix

I want to build a square matrix. Let's suppose We have this matrix called nodes 1 4.3434 3.4565 2 6.2234 5.1234 3 1...

9年弱 前 | 1 件の回答 | 0

質問

indexing a square matrix in the best possible way

I have a square matrix and I would check some condition of every element of it.which could be the best way to indexing a square ...

9年弱 前 | 3 件の回答 | 0

質問

fill a vector inside a cycle

I have a script where I have to fill a vector like this example: heads = (1:10); vector_to_fill = zeros(1,5); for i...

9年弱 前 | 1 件の回答 | 0

質問

how preallocate structure for better memory

I had created a structure made so: head.number = 3; head.pck_rcv = [1 0 0]; heads(2).number = 5; head(2).pck_r...

9年弱 前 | 3 件の回答 | 1

質問

store values in a certain way

I would store values in a certain way like this: For example I have values as [2 3] to this values I would connect to 2 a vec...

9年弱 前 | 1 件の回答 | 0

質問

preallocate vector or not

I'm doing a simulation and I initialize a vector that will contain during the simulation integer values. At the beginning I don'...

9年弱 前 | 3 件の回答 | 0

質問

find index of a matrix through another matrix

I have this matrix A = [1 3 4 6 7] and B = [3 4] that it's a subset of A matrix. For example I would find the index of B matrix ...

9年弱 前 | 3 件の回答 | 0

質問

same values using randi setting seed as default

I'm using randi to generate rand integer valeus but I get the same values two times in my vector. example rng default; f...

9年弱 前 | 5 件の回答 | 0

質問

enter in the if clause only in certain situation

I would execute a block only if I have this vector A=[1 0] instead if I'd have A=[0 0] or A=[1 1] if clause shouldn't be...

9年弱 前 | 1 件の回答 | 0

質問

how to create while statement

I'd create while statement that should works like: A is an column vector while [every A element is not equals to 1] ...

9年弱 前 | 1 件の回答 | 0

質問

there is a way that if clause it is execute

Here it is a piece of code: x = rand; if x < 1E-6 do-something end if I execute this piece of block in l...

9年弱 前 | 1 件の回答 | 0

質問

find if a column vector contains at least element 1

I have to check if column vector has at least element 1. Does Matlab have such similar function or I have to build it myself?

9年弱 前 | 2 件の回答 | 0

質問

rand integer values from an array

I have an array that contains some integer. i.e A=[1 5 7 9] I would choose a rand value from this vector. Which cou...

9年弱 前 | 1 件の回答 | 0

質問

best way to enter only one time in a if block

I have a for cycle for n= 1: 100 x=rand()*10; if x > 5 do something end end When I exec...

9年弱 前 | 1 件の回答 | 0

質問

obtaining values major than 10e-7

I use rand function to generate values x = rand; after that I compared generated values to 10e-7 if x > 10e-7...

9年弱 前 | 1 件の回答 | 0

質問

Obtaining same values at avery simulation using rand function

I'm building some simulations with matlab and I use rand function. I would obtain at every run, the same results. I read somewhe...

9年弱 前 | 3 件の回答 | 0