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

circa 11 anni fa | 0

| accettato

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

oltre 11 anni fa | 1

| accettato

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

oltre 11 anni fa | 1

| accettato

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

oltre 11 anni fa | 0

| accettato

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

oltre 11 anni fa | 0

| accettato

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

oltre 11 anni fa | 0

| accettato

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

oltre 11 anni fa | 0

| accettato

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

oltre 11 anni fa | 1

| accettato

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

oltre 11 anni fa | 0

| accettato

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

oltre 11 anni fa | 0

| accettato

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

oltre 11 anni fa | 1

| accettato

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

oltre 11 anni fa | 0

| accettato

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

oltre 11 anni fa | 0

| accettato

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

oltre 11 anni fa | 1

| accettato

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

oltre 11 anni fa | 1

| accettato

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

oltre 11 anni fa | 2

| accettato

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

oltre 11 anni fa | 1

| accettato

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

oltre 11 anni fa | 1

| accettato

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

oltre 11 anni fa | 0

| accettato

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

oltre 11 anni fa | 0

| accettato

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

oltre 11 anni fa | 2

| accettato

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

oltre 11 anni fa | 1

| accettato

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

oltre 11 anni fa | 0

| accettato

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

oltre 11 anni fa | 1

| accettato

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

oltre 11 anni fa | 0

| accettato

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

oltre 11 anni fa | 0

| accettato

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

oltre 11 anni fa | 2

| accettato

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

oltre 11 anni fa | 0

| accettato

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

oltre 11 anni fa | 0

| accettato

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

oltre 11 anni fa | 1

| accettato

Carica altro