Réponse apportée
Why is time steps changing the graphic? (diffusion equation)
haven't read through your code, but you change your time step it is highly possible that your scheme becoming unstable and it is...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
putting columns together as a table
a={rand(10,1)}; b={rand(10,1)}; c={rand(10,1)}; T=table(); T.a=cell2mat(a) T.b=cell2mat(b) T.c=cell2m...

plus de 11 ans il y a | 1

| A accepté

Réponse apportée
correlation between 2 matrix
Does <http://www.mathworks.com/help/images/ref/corr2.html corr2> command work for you?

plus de 11 ans il y a | 1

| A accepté

Réponse apportée
How working on a matrix with a large number of rows?
try this: Assuming X is storing your coordinates, (1 point per row) and (x,y,z) are the three columns, use <http://www.mathwo...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
multiplying a weight mask with input matrix
use <http://www.mathworks.com/help/matlab/ref/conv2.html conv2> function That will get the job done much faster.

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
How to minimize the loop function?
Change for GrayValue = 0 : 255 for i = 1 : m for j = 1 : n if I(i,j) == GrayValue S(GrayVa...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
how can i show the functions files to other computers in parallel computing with main file
On your other computers, before running your code check if sb1 function is visible. type sb1 or edit sb1 see it open proper file...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
Large For Loop Executions
How do you want to store that in memory? 6e36*24 elements stored at 1B an element (uint8) requires more than 1.34e29GB of mem...

plus de 11 ans il y a | 1

| A accepté

Réponse apportée
how can i convert array of bits into single bit stream?
Do you mean something like this? a=round(rand(1,20)) a = Columns 1 through 16 1 0 1 ...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
Does tables allow null as an element?
I don't think so. But you can assign NaN to an element in a table.

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
display Empty matrix: 1-by-0
This is very tricky You can not use *end* as a variable name. That is a reserved word. SO pretty much your definition of t...

plus de 11 ans il y a | 1

| A accepté

Réponse apportée
Do we have any Fucntion which can generate +1 and -1 randomly????
I don't think there is any function doing that. Here is another approach: sign(rand(1,10)-0.5) or (-1).^(round(r...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
How to do convolution of more than 2 signals? I keep on getting errors
<http://www.mathworks.com/help/matlab/ref/conv.html conv> only accepts two signal at a time. you can not pass it three signal.

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
Count unique categorical values in table
something like this: First your code to generate sample data: LastName = {'Smith';'Johnson';'Williams';'Jones';'Brown'};...

plus de 11 ans il y a | 1

| A accepté

Réponse apportée
parfor calculations take longer time than for
It has to do with the communication and the way you are addressing the memory or slicing the variable. In general this sort o...

plus de 11 ans il y a | 1

| A accepté

Réponse apportée
how to read multiple images and calculate mean?
There are two options: *1) If you don't have "Computer Vision Toolbox"* Then read the images as follow: for i=1:nImag...

plus de 11 ans il y a | 2

| A accepté

Réponse apportée
Generate a cell with 10 elements
my solution would be: vlen=randi(10,[10,1]) V=arrayfun(@(x) (mod(x,2)*ones(x,1)),vlen,'UniformOutput',false) Now th...

plus de 11 ans il y a | 1

| A accepté

Réponse apportée
griddata for closed surface
The problem is that it doesn't recognize that phi=360 and phi=0 are actually the same point. use <http://www.mathworks.com/he...

plus de 11 ans il y a | 1

| A accepté

Réponse apportée
Vectorization of a for loop (addition of a vector)
This is cumulative sum so use *cumsum* function a = [1 2 3 4 5 6 7 8 ] a_new=cumsum(a) a_new = 1 3 6...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
Copy table's certain data into another table with corresponding variable names
Lets say you want move column Age from table1 to table2 table2.Age=table1.Age Or if you want to move column 5 to 8 of ta...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
How to create images database in matlab to store 5 images.
load them into separate cell array imageDB{1}=imread('img1.jpg'); imageDB{2}=imread('img2.jpg');

plus de 11 ans il y a | 2

| A accepté

Réponse apportée
How to run exe with argumants using matlab
system('myexe.exe parName1 str1 parName2 val2') so pretty much the same command that you run it in command prompt or shell,...

plus de 11 ans il y a | 1

| A accepté

Réponse apportée
How do I input a matrix (variable) in a function?
1) why you have comma in your function name? 2) Change your equation in element wise division as follow: wavelengtha= 1./ ...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
How can I sort data in a loop with an if selection structure?
Another way of coding without all these if then classes is this: % Generating some random grades Grades_Numeric=randi(10...

plus de 11 ans il y a | 1

| A accepté

Réponse apportée
draw a Cuboid with colorcode
1) First you need to interpolate your well data into a regularly spaced grids. 2) then use the *slice* command to generate th...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
How to rotate a line about center point??
Let's say you want to rotate around and arbitrary points designated by (ro,co); Here how you can do it: % Top left corne...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
How can i separate four bands from a tif image.
Read the image using imread or geotifread as regular Let's say i issued: I=imread('satimage.tif'); then I is of size MxNx4...

plus de 11 ans il y a | 2

| A accepté

Réponse apportée
How can I suppresses the display of error messages with urlwrite ?
I think the best is to fix your command. the minimum usage of urlwrite is: [filestr,status]=urlwrite(URL,filename) so, ...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
Solving Non-Linear Equations
Make sure that the following function that you wrote: function F = myfun(x) F = [20+0.534*1 - x(1)*(x(2)^0.88); 696-0....

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
How to combine 3 xyz data files
Follow this procedure: 1) load your three files into a,b,c variable 2) combine them into one variable: x=[a(:,1),b(:,...

plus de 11 ans il y a | 1

| A accepté

Charger plus