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

alrededor de 11 años hace | 0

| aceptada

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

alrededor de 11 años hace | 1

| aceptada

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

alrededor de 11 años hace | 1

| aceptada

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

alrededor de 11 años hace | 0

| aceptada

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

alrededor de 11 años hace | 0

| aceptada

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

alrededor de 11 años hace | 0

| aceptada

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

alrededor de 11 años hace | 0

| aceptada

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

alrededor de 11 años hace | 1

| aceptada

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

alrededor de 11 años hace | 0

| aceptada

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

alrededor de 11 años hace | 0

| aceptada

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

alrededor de 11 años hace | 1

| aceptada

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

alrededor de 11 años hace | 0

| aceptada

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

alrededor de 11 años hace | 0

| aceptada

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

alrededor de 11 años hace | 1

| aceptada

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

alrededor de 11 años hace | 1

| aceptada

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

alrededor de 11 años hace | 2

| aceptada

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

alrededor de 11 años hace | 1

| aceptada

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

alrededor de 11 años hace | 1

| aceptada

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

alrededor de 11 años hace | 0

| aceptada

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

alrededor de 11 años hace | 0

| aceptada

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

alrededor de 11 años hace | 2

| aceptada

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

alrededor de 11 años hace | 1

| aceptada

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

alrededor de 11 años hace | 0

| aceptada

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

más de 11 años hace | 1

| aceptada

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

más de 11 años hace | 0

| aceptada

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

más de 11 años hace | 0

| aceptada

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

más de 11 años hace | 2

| aceptada

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

más de 11 años hace | 0

| aceptada

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

más de 11 años hace | 0

| aceptada

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

más de 11 años hace | 1

| aceptada

Cargar más