Réponse apportée
How do I save multiple variables from the workspace as a .out file?
X = rand(10); Y = ones(3); dlmwrite('data.out', X); dlmwrite('data.out', Y, '-append')

plus de 11 ans il y a | 1

| A accepté

Réponse apportée
How can I read Or Use txt file for Next Step?
X = dlmread('a_freq.txt'); [Y w] = tfidf2(X, 'Logarithmic');

plus de 11 ans il y a | 0

Réponse apportée
Undefined function or variable "Horz_average_l"
The last if seems to have no body. Please format all your code. Why do you use syms i j side Start End Where is P...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
2 variables in a loop
You do not need a for loop, use piece-wise multiplication .* ic=0.1:0.1:95.5; c=ic.*Vm_1000;

plus de 11 ans il y a | 0

Réponse apportée
Graph figure wont show
Because your y is just a single point. Work on the whole vector and make sure to use .*, ./ and .^ when you want point-wise ope...

plus de 11 ans il y a | 0

Réponse apportée
Create matrix row element if row elements of two previous matrices are identical
In this example A is the large matrix and B the small one A = round(10*rand(10, 3)); A = [A; A(1:2, :)]; B = A(1:2:end,...

plus de 11 ans il y a | 1

Réponse apportée
How to create Array in structure??
s.a1 = rand(10); s.a2 = rand(20);

plus de 11 ans il y a | 0

Réponse apportée
displaying specific range of data with different color in a plot
I know of no other way as splitting the x into those different parts that you need to color differently. E.g., to plot negative ...

plus de 11 ans il y a | 0

Réponse apportée
Generic Variable Names and Cell Arrays
You should avoid organizing your data by using 16 different variables. Instead, you can use a 3D matrix M(r,i,:) where r runs fr...

plus de 11 ans il y a | 2

Réponse apportée
how to separate some pixel intensity values of a image matrix in matlab ?
Output = A(A > 100 & A < 230)

plus de 11 ans il y a | 1

Réponse apportée
hi i hav set of 100 images and i want to store its feture vector in 100 rows each image is having 9 features.so pls tell me some easy method...thanks
This pseudo-code should give you a hint how to start: for i = 1:100 imagename = ... % depending on how the images are n...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
How do I average a data which runs on a cycle?
Read your data into one big 100xN matrix D (e.g., using dlmread) and then use mean(D). Voila.

plus de 11 ans il y a | 1

Réponse apportée
Neural Network for Random Sequence Generation
One way to do it would be to xor output 1 and 2 to get input 1, and output 3 and 4 to get input 2: output = [ 1 0 1 1]; % ...

plus de 11 ans il y a | 1

Réponse apportée
least square fit matrix dimension errors
You forgot to define alpha, delta, gamma; if they are rand(T,1); you have to use alpha(t), delta(t), gamma(t).

plus de 11 ans il y a | 0

Réponse apportée
readjusting Y limits on subplots
Do your plots and store the gca for each plot for i = 1:3 subplot(1, 3, i) plot(10*hist(rand(1, 100))); % some ra...

plus de 11 ans il y a | 5

Réponse apportée
solving matrix equation '[A]*(x)=(b) with variables at the x and b vectors
You have to convert the equation into a proper linear form. First you multiply x with A to get 1 + 2x = 0 2 + 1x = u ...

plus de 11 ans il y a | 1

| A accepté

Réponse apportée
Issues using an efficient positivity constraint
I see. Than you can use your second code or (only one max, probably faster): temp = max(0,p_w); p_w_plus = temp./repmat(...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
Issues using an efficient positivity constraint
To obtain values of 0 or higher, of course you can simply use p_w = abs(p_w); or p_w = max(0, p_w); Obviously t...

plus de 11 ans il y a | 0

Réponse apportée
Character to Binary function?
c = input('Enter a character > ', 's'); binvecc = logical(dec2bin(c, 8) - '0'); sprintf('%x', binvecc)

plus de 11 ans il y a | 0

Réponse apportée
How to generate random numbers of two correlated variables following lognormal probability distribution?
If N has a normal distribution, exp(N) has a lognormal distribution: x = -10:0.1:10; N = randn(1, 10^6); plot(x,hist(...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
How do I get two images to display top and bottom of screen in Matlab/Psychtoolbox? I can already do left and right sides.
The values are the x,y coordinates of the top right coordinates of the rectangle the x,y coordinates of the bottom left coordina...

plus de 11 ans il y a | 1

| A accepté

Réponse apportée
Find within string, location where space doesn't occur before upper (capital) letter
To get the indices ind = regexp(string, '(^|[^ ])[A-Z]'); To extract the strings from the indices L{1} = string(1:i...

plus de 11 ans il y a | 1

| A accepté

Réponse apportée
Plotting points and lines
This should give you an idea how to solve it gplot(adj_matrix==1, m', 'bo-') gplot(adj_matrix==2, m', 'ro-') gplot(ad...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
Problem to Read .txt file
You probably should first have a look at your .txt file to check if is has reasonable values, all separated by commas (or blanks...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
Creating a large set of random numbers
You could split your random numbers into, e.g., 557056 vectors of 10^5 random numbers and iteratively work on each 10^5 element...

plus de 11 ans il y a | 0

Réponse apportée
Why is y-axis in loglog not 0?
If you do not have to use a loglog plot, semilogx may be useful semilogx(MockN1,MockF1,'o') ylim([0 250])

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
How to perform row wise operation for a matrix of 250x250
This is basically the algorithm suggested by Guillaume with an addditional check for the special case where the row has no 0's; ...

plus de 11 ans il y a | 0

Réponse apportée
Saving an array to a fits file
Reading the ith image: (adapted from the Mathwork's help for fitsread) info = fitsinfo('fitsfile.fits'); rowend ...

plus de 11 ans il y a | 0

Réponse apportée
Iterate through matrix until no more possible calculations.
Store the b, c, d arrays as cell elements in cell b. Then insert the i'th row of a into anew if its not element of any list in b...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
How to add random valued impulse noise in the image?
To add uniformly distributed random noise you can use I = im2double(rgb2gray(imread('peppers.png'))); p = 0.2; % p betwe...

plus de 11 ans il y a | 0

| A accepté

Charger plus