Réponse apportée
Column-wise AND operation in all column combinations of two matrices
This should do it: C = bsxfun(@and, a, reshape(b,[12,1,3]); theresult = C(down,column_a,column_b);

environ 12 ans il y a | 0

| A accepté

Réponse apportée
Finding and using sparse matrix indices
If L is the same size as M: idx = find(L); Move the idx around by adding 1 (moves it down one), or by adding the number o...

environ 12 ans il y a | 1

| A accepté

Réponse apportée
problem with input arguments
You need to supply those arguments to the function, by calling it like: tempo_var_with_silly_long_name = 5; %use the real va...

environ 12 ans il y a | 0

Réponse apportée
How to join several matrices into one matrix?
Either of these will do what you've asked. matrix = reshape(matrix,4794,588); matrix = permute(matrix,[1 3 2]);

environ 12 ans il y a | 0

Réponse apportée
Loop or no Loop?
You need to figure out the right process for splitting your dataset. Something like: dlat = abs(diff(latitude)); da...

environ 12 ans il y a | 0

| A accepté

Réponse apportée
ok button gives error:Subscript indices must either be real positive integers or logicals. Error using waitfor Error while evaluating uicontrol Callback
That error is because, somewhere in your code you've got something like number = -1; array(0) or array(1.4) or array(23,0)...

environ 12 ans il y a | 0

Réponse apportée
How to a creat a sweeping radius, like that of a radar.
This is NOT the full answer, but it should get you started. a = plot([0 xmax],[0 0],'r-'); hold on b = plot(x,y,'bx'); ...

environ 12 ans il y a | 0

Réponse apportée
Rotate surface X Y Z around Y axis
The obvious issue is that you're updating X, then using the updated X to calculate a new Z. Store the old X, or the new one, ...

environ 12 ans il y a | 0

Réponse apportée
Numeric column, text column, uitable using guide
This is how I'd do it: Table_o_values = [1 561 1; 2 156 2; 4 951 3]; In the 3rd c...

environ 12 ans il y a | 0

Réponse apportée
save data from function to ws
You have three options. 1. Use evalin or assignin correctly to put the variable into the base workspace. 2. Change your ...

environ 12 ans il y a | 0

| A accepté

Réponse apportée
Subscript indices must either be real positive integers or logicals. Error!
(row-widthless):(row+widthmore) Thats probably giving you a negative (or zero) number which you're trying to use as an index...

environ 12 ans il y a | 0

Réponse apportée
What are the commands for a function that allows the user to input arguments and store them in the variables x and y?
Can you be more specific? How do you want the user to input arguments? The functions, "input", "inputdlg", "uigetfile", al...

environ 12 ans il y a | 0

Réponse apportée
How to train a Neural Network with an input data set that comprises of numeric values as well as nominal variables (such as the base fluid used which could be either 'Water', 'Oil' or 'Slickwater')?
You could make your non-numeric values into numeric ones by using enumerations. E.g. Oil = 1; Water = 2; Slickwater...

environ 12 ans il y a | 0

Réponse apportée
making an array 'skip' some numbers
left_x = -4:-2; right_x = 2:4; x = [left_x right_x]; You could do also something like: x = [-180:10:-110 -105:5:-...

environ 12 ans il y a | 2

| A accepté

Réponse apportée
i plotted a graph its X-axis ranging from 0-1800 with a spacing of 200. how can i change the interval to 50 with same range(0-1800)
Starting after you've plotted it: set(gca,'XTick',[0:50:1800])

environ 12 ans il y a | 0

Réponse apportée
writing out data within a for loop
MMCmatrix{m} = [max mean count]; should be: MMCmatrix(m,:) = [max mean count]; or MMCmatrix(:,m) = [max mean...

environ 12 ans il y a | 0

| A accepté

Réponse apportée
Why imerode( ) is not giving intended results ?
Its cause your filter isn't 3x3.

environ 12 ans il y a | 0

Réponse apportée
AMD @ 4x4.1Ghz slower than Intel @ 2x1.7Ghz
Does the old laptop have: A bigger cache? - Allowing faster memory access to a small area of memory? A better cache least ...

environ 12 ans il y a | 0

Réponse apportée
how run two codes at the same time from GUI?
The best you can probably sensibly do is just use parallel computing. Something like parfor i = 1:2 if i == 1 res...

environ 12 ans il y a | 0

Réponse apportée
Macros in Matlab - repeating simple instructions
Step 1: Write a "function" that takes as input, an argument for filename in, and filename out, opens & reads your input file, do...

environ 12 ans il y a | 1

| A accepté

Réponse apportée
Which is the machine precision of Matlab?
Matlab stores and operates on doubles. Doubles have 15-ish significant figures of precision. If you keep your numbers all ro...

environ 12 ans il y a | 0

| A accepté

Réponse apportée
3D matrix - 2 D plot, how to make a plot ?
Have you tried: plot(relor(:,:,1)') %? If you do it explicitly, you'll get exactly what you want: plot(relor(:,1,1),'...

environ 12 ans il y a | 0

Réponse apportée
Can I run 2 versions of a function in 2 different Matlab sessions?
You most certainly can run Version 1 of function "blah" in one instance of matlab, update blah to version 2, open up a second in...

environ 12 ans il y a | 1

| A accepté

Réponse apportée
trying to minimize the memory of a matrix with sparse
Sparse only saves memory if your array is _dominated_ by 0. That is exactly zero, and not small numbers. The memory used by ...

environ 12 ans il y a | 0

Réponse apportée
Clean it up from successive calculation
Data formats tell you what the data represents. Doubles are actually the best, commonly used, method to store signed numbers wit...

environ 12 ans il y a | 0

Réponse apportée
Is Simulink suited to simulate trains on a rail system?
Simulink can simulate discrete systems operating in a continuous world. It can replicate the functions of hardware. What asp...

environ 12 ans il y a | 0

Réponse apportée
Save FOR loop data into a vector
You need your for loop to index into X, rather than use X as the index. for j = 1:numel(X) i = X(j); your code as norm...

environ 12 ans il y a | 0

| A accepté

Réponse apportée
(MATLAB beginner) How can I solve this error: In an assignment A(:) = B, the number of elements in A and B must be the same.
Ick. Data is a cell array that contains a cell array that contain arrays. Data{1,1}{index3+1}(52:58) is 7 characters long. ...

environ 12 ans il y a | 1

| A accepté

Réponse apportée
Being more concise with an IF statement
I'm assuming that CN only has one column. number = CN(count6); temp(1,:) = bond_atom; temp(all(temp==0,2),:) = []; CNo...

environ 12 ans il y a | 0

| A accepté

Réponse apportée
What happens when numbers get very small?
Matlab simply uses standard double format numbers. This gives you about 15 significant figures of precision from 10^-300 to ...

environ 12 ans il y a | 0

| A accepté

Charger plus