Beantwortet
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...

mehr als 9 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 9 Jahre vor | 1

| akzeptiert

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

mehr als 9 Jahre vor | 1

| akzeptiert

Beantwortet
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...

mehr als 9 Jahre vor | 0

| akzeptiert

Beantwortet
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.

mehr als 9 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 9 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 9 Jahre vor | 0

| akzeptiert

Beantwortet
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...

mehr als 9 Jahre vor | 1

| akzeptiert

Beantwortet
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 ...

fast 10 Jahre vor | 0

| akzeptiert

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

fast 10 Jahre vor | 0

| akzeptiert

Beantwortet
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...

fast 10 Jahre vor | 1

| akzeptiert

Beantwortet
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...

fast 10 Jahre vor | 0

| akzeptiert

Beantwortet
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.

fast 10 Jahre vor | 0

| akzeptiert

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

fast 10 Jahre vor | 1

| akzeptiert

Beantwortet
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...

fast 10 Jahre vor | 1

| akzeptiert

Beantwortet
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...

fast 10 Jahre vor | 2

| akzeptiert

Beantwortet
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...

fast 10 Jahre vor | 1

| akzeptiert

Beantwortet
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...

fast 10 Jahre vor | 1

| akzeptiert

Beantwortet
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...

fast 10 Jahre vor | 0

| akzeptiert

Beantwortet
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...

fast 10 Jahre vor | 0

| akzeptiert

Beantwortet
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');

fast 10 Jahre vor | 2

| akzeptiert

Beantwortet
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,...

fast 10 Jahre vor | 1

| akzeptiert

Beantwortet
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./ ...

fast 10 Jahre vor | 0

| akzeptiert

Beantwortet
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...

fast 10 Jahre vor | 1

| akzeptiert

Beantwortet
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...

fast 10 Jahre vor | 0

| akzeptiert

Beantwortet
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...

fast 10 Jahre vor | 0

| akzeptiert

Beantwortet
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...

fast 10 Jahre vor | 2

| akzeptiert

Beantwortet
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, ...

fast 10 Jahre vor | 0

| akzeptiert

Beantwortet
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....

fast 10 Jahre vor | 0

| akzeptiert

Beantwortet
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(:,...

fast 10 Jahre vor | 1

| akzeptiert

Mehr laden