Answered

JPEG compression algorithm implementation in MATLAB

I think that you might as well replace t = dctmtx(8); y = blkproc(x, [8 8], 'P1 * x * P2', t, t'); with y = blkp...

JPEG compression algorithm implementation in MATLAB

I think that you might as well replace t = dctmtx(8); y = blkproc(x, [8 8], 'P1 * x * P2', t, t'); with y = blkp...

8 years ago | 1

| accepted

Answered

How to Subtract two rows of same matrix?

tmp = A(1,:)-A(2,:) But A1 is a 3x3 matrix and not like A which is a 2x2, so how do you want to insert the elements? We c...

How to Subtract two rows of same matrix?

tmp = A(1,:)-A(2,:) But A1 is a 3x3 matrix and not like A which is a 2x2, so how do you want to insert the elements? We c...

8 years ago | 0

| accepted

Answered

separate codes work, together don't

I don't know the values of the variables you are using but this seems to work n = 5; k = rand(n,n); sk = size(k) ...

separate codes work, together don't

I don't know the values of the variables you are using but this seems to work n = 5; k = rand(n,n); sk = size(k) ...

8 years ago | 0

| accepted

Answered

Scatter3 and surf yields a bug?

The reason the points disappear when you move the eye's position is because of axis clipping planes used by Matlab. When the poi...

Scatter3 and surf yields a bug?

The reason the points disappear when you move the eye's position is because of axis clipping planes used by Matlab. When the poi...

8 years ago | 0

Answered

Is there a a function/code which can make the darker bits darker and the lighter bits lighter?

If you have the image processing toolbox you can use imcontrast. <http://www.mathworks.se/help/images/ref/imcontrast.html>

Is there a a function/code which can make the darker bits darker and the lighter bits lighter?

If you have the image processing toolbox you can use imcontrast. <http://www.mathworks.se/help/images/ref/imcontrast.html>

8 years ago | 0

Answered

Fast matrix computation of a 'riccati like' equation in a 'for' loop

I would like to preface my answer by saying that your code is essentially as fast as it gets. Matlab is very fast when it comes ...

Fast matrix computation of a 'riccati like' equation in a 'for' loop

I would like to preface my answer by saying that your code is essentially as fast as it gets. Matlab is very fast when it comes ...

8 years ago | 0

Answered

Help reduce the time.

On my computer it takes *0.0374 s* (q = 1:10⁷). The code is essentialy copying data. I tried with just removing the second eleme...

Help reduce the time.

On my computer it takes *0.0374 s* (q = 1:10⁷). The code is essentialy copying data. I tried with just removing the second eleme...

8 years ago | 0

Answered

Attempted to access indx(1); index out of bounds because numel(indx)=0.

It would be better if you could give us an example of all the arguments, so we can try it out for ourselves. I know what the imm...

Attempted to access indx(1); index out of bounds because numel(indx)=0.

It would be better if you could give us an example of all the arguments, so we can try it out for ourselves. I know what the imm...

8 years ago | 0

| accepted

Answered

Image division into blocks

If you have the image processing toolbox you could use blocproc <http://www.mathworks.se/help/images/ref/blockproc.html blockpro...

Image division into blocks

If you have the image processing toolbox you could use blocproc <http://www.mathworks.se/help/images/ref/blockproc.html blockpro...

8 years ago | 0

Solved

Convert a vector into a number

This is a sub problem related to this problem: <http://www.mathworks.com/matlabcentral/cody/problems/621-cryptomath-addition>...

8 years ago

Answered

How to set units of image of an array to pixels?

I believe you are looking for truesize(gcf, [1000 1000]) See <http://www.mathworks.se/help/images/ref/truesize.html doc...

How to set units of image of an array to pixels?

I believe you are looking for truesize(gcf, [1000 1000]) See <http://www.mathworks.se/help/images/ref/truesize.html doc...

8 years ago | 1

| accepted

Answered

Building cylinder using isosurface

I would try using a function test = @(x) abs( cos(4*x) ); [x,y,z] = meshgrid(-1:.02:1); blob = z <= 0 & z >= -1 &...

Building cylinder using isosurface

I would try using a function test = @(x) abs( cos(4*x) ); [x,y,z] = meshgrid(-1:.02:1); blob = z <= 0 & z >= -1 &...

8 years ago | 0

| accepted

Answered

can anyone provide some literature on rician and rayleigh noise?

I don't know much about Rician noise in particular, but I have heard is the most difficult noise to reduce because it is not add...

can anyone provide some literature on rician and rayleigh noise?

I don't know much about Rician noise in particular, but I have heard is the most difficult noise to reduce because it is not add...

8 years ago | 0

Answered

Problem plotting date from excel file

I think you want <http://www.mathworks.se/help/matlab/ref/datenum.html Datenum>.

Problem plotting date from excel file

I think you want <http://www.mathworks.se/help/matlab/ref/datenum.html Datenum>.

8 years ago | 0

Answered

How can I determine or formulate certain intervals from a given set of data.

If I understand it correctly, you want something like this? %mock data, increasing numbers data = 50*rand(50,1); data...

How can I determine or formulate certain intervals from a given set of data.

If I understand it correctly, you want something like this? %mock data, increasing numbers data = 50*rand(50,1); data...

8 years ago | 0

| accepted

Answered

Code for find the MST using Kruskal or Prims algorithm.

Do you want the code or just a function that computes MST? For the function, see <http://www.mathworks.se/help/bioinfo/ref/graph...

Code for find the MST using Kruskal or Prims algorithm.

Do you want the code or just a function that computes MST? For the function, see <http://www.mathworks.se/help/bioinfo/ref/graph...

8 years ago | 0

Answered

How do I convert a vector of vertex coordinates and a list of edges to a DXF file?

The program you mention can only convert one curve to a DXF file. Is it able to convert to a ascii DXF file? If that is the case...

How do I convert a vector of vertex coordinates and a list of edges to a DXF file?

The program you mention can only convert one curve to a DXF file. Is it able to convert to a ascii DXF file? If that is the case...

8 years ago | 0

Answered

Loop with different images on Matlab

I don't know exactly what you do in the function READINGPARAMETERS, but I would first let the function store the values in a mat...

Loop with different images on Matlab

I don't know exactly what you do in the function READINGPARAMETERS, but I would first let the function store the values in a mat...

8 years ago | 0

| accepted

Answered

Hello all, am a beginner to image processing,

Convolution, both linear and circular, is used in many areas of optics, image processing, signal processing and beyond. My m...

Hello all, am a beginner to image processing,

Convolution, both linear and circular, is used in many areas of optics, image processing, signal processing and beyond. My m...

8 years ago | 0

| accepted

Answered

How do I create a grid of squares with text labels inside each square?

There are a couple of ways to do this, it depends on whether you want to have adjacent squares or squares with space between the...

How do I create a grid of squares with text labels inside each square?

There are a couple of ways to do this, it depends on whether you want to have adjacent squares or squares with space between the...

8 years ago | 0

| accepted

Answered

How can i call the value of another variable defined or solved above for solving another equation?

Try syms x p = 1:7; f = 1:7; solve(p(1)*x^6+p(2)*x^5+p(3)*x^4+p(4)*x^3+p(5)*x^2+p(6)*x+p(7)==f(1), x)

How can i call the value of another variable defined or solved above for solving another equation?

Try syms x p = 1:7; f = 1:7; solve(p(1)*x^6+p(2)*x^5+p(3)*x^4+p(4)*x^3+p(5)*x^2+p(6)*x+p(7)==f(1), x)

8 years ago | 0

Answered

How do I count the total number of conditions from .CSV file

_Edit: I first thought you wanted to store the values of 'i' when the conditions are true. So, I would use a vector for that. If...

How do I count the total number of conditions from .CSV file

_Edit: I first thought you wanted to store the values of 'i' when the conditions are true. So, I would use a vector for that. If...

8 years ago | 0

| accepted

Answered

Help with excel to matlab

Given the new problem I will give a new answer ;-) I would not store the characters as variable names, it is better to store ...

Help with excel to matlab

Given the new problem I will give a new answer ;-) I would not store the characters as variable names, it is better to store ...

8 years ago | 0

| accepted

Answered

Help with excel to matlab

*Edit: I fixed the while so it uses Raw instead of tekst.* I think this code will do what you want. I only consider the examp...

Help with excel to matlab

*Edit: I fixed the while so it uses Raw instead of tekst.* I think this code will do what you want. I only consider the examp...

8 years ago | 0

Answered

How to vectorize a loop over rows ?

Jan: Nice. That was actually my first thought, but I only used it on x_test (regged and downloaded from Kaggle before Karan uplo...

How to vectorize a loop over rows ?

Jan: Nice. That was actually my first thought, but I only used it on x_test (regged and downloaded from Kaggle before Karan uplo...

8 years ago | 0

Answered

Is there any way to control the number of decimal places for the outputs?

I would use num2str(pi,5) to get a string of pi with 5 decimals, for instance.

Is there any way to control the number of decimal places for the outputs?

I would use num2str(pi,5) to get a string of pi with 5 decimals, for instance.

8 years ago | 0

Answered

How to concatenate value calculated in a for loop?

I guess you want to place the values in a vector? Ratek = zeros(10,1); %preallocate vector for t=1:10 Ratek(t...

How to concatenate value calculated in a for loop?

I guess you want to place the values in a vector? Ratek = zeros(10,1); %preallocate vector for t=1:10 Ratek(t...

8 years ago | 0

Answered

Batch file: how to access .mat files in different folders?

I assume that all your .mat files are at a certain level (one "folder" down) in the file tree. This could be modified to suit yo...

Batch file: how to access .mat files in different folders?

I assume that all your .mat files are at a certain level (one "folder" down) in the file tree. This could be modified to suit yo...

8 years ago | 1

Answered

Adding values to a variable in a loop?

It seems as though pixel_data(i,1) is still a cell. Have you tried pixel_data{i,1}? If I try pixel_data={1,4,7,8} ...

Adding values to a variable in a loop?

It seems as though pixel_data(i,1) is still a cell. Have you tried pixel_data{i,1}? If I try pixel_data={1,4,7,8} ...

8 years ago | 0

Answered

code gives me a false values?

You want to store the result in the correct positions in the resulting vector. You keep placing the value in e1. It is better to...

code gives me a false values?

You want to store the result in the correct positions in the resulting vector. You keep placing the value in e1. It is better to...

8 years ago | 0