已回答
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...

10 years 前 | 0

| 已接受

已回答
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...

10 years 前 | 1

| 已接受

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

10 years 前 | 1

| 已接受

已回答
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...

10 years 前 | 0

| 已接受

已回答
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.

10 years 前 | 0

| 已接受

已回答
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...

10 years 前 | 0

| 已接受

已回答
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...

10 years 前 | 0

| 已接受

已回答
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...

10 years 前 | 1

| 已接受

已回答
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 ...

10 years 前 | 0

| 已接受

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

10 years 前 | 0

| 已接受

已回答
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...

10 years 前 | 1

| 已接受

已回答
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...

10 years 前 | 0

| 已接受

已回答
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.

10 years 前 | 0

| 已接受

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

10 years 前 | 1

| 已接受

已回答
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...

10 years 前 | 1

| 已接受

已回答
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...

10 years 前 | 2

| 已接受

已回答
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...

10 years 前 | 1

| 已接受

已回答
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...

10 years 前 | 1

| 已接受

已回答
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...

10 years 前 | 0

| 已接受

已回答
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...

10 years 前 | 0

| 已接受

已回答
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');

10 years 前 | 2

| 已接受

已回答
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,...

10 years 前 | 1

| 已接受

已回答
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./ ...

10 years 前 | 0

| 已接受

已回答
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...

10 years 前 | 1

| 已接受

已回答
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...

10 years 前 | 0

| 已接受

已回答
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...

10 years 前 | 0

| 已接受

已回答
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...

10 years 前 | 2

| 已接受

已回答
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, ...

10 years 前 | 0

| 已接受

已回答
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....

10 years 前 | 0

| 已接受

已回答
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(:,...

10 years 前 | 1

| 已接受

加载更多