Answered
multiplication of matrix with blocks of an image ( 3 channel)
a=randi(5,2,2,3) b=randi(5,2,2,3) c=a.*b

10 years ago | 0

Answered
How do i add a physikal scaling to an axis (f.a. centimeters) and save these informations together with the image into a .mat file?
You can use <http://www.mathworks.com/help/matlab/ref/hgsave.html hgsave> and hgload

10 years ago | 0

| accepted

Answered
Build a curve y (x) on the specified view.
a=5 b=4 t=0:0.01:2*pi x=(a+b)*cos(t)-a*cos((a+b)*t/a); y=(a+b)*sin(t)-a*sin((a+b)*t/a); plot(x,y) or maybe 3D plot ...

10 years ago | 1

| accepted

Answered
how to convert rgb pixel value into single value in matlab? this is my code
b=rgb2gray(a) imshow(b)

10 years ago | 0

Answered
Once a row value is zero, set all values after that point in that row to zero?
out=A.*(cumprod(A,2)~=0)

10 years ago | 1

| accepted

Answered
How to use data from gui (by using edit box) in .m files???
Save your data in a mat file, then you can use them with any other Matlab file

10 years ago | 1

| accepted

Answered
How to get two adjacent columns in loop
a=[0 1 2 3 4 5 6;1 7 8 9 10 11 12;2 13 14 15 16 17 18] freq=a(:,1) v1=a(:,2:2:end); v2=a(:,3:2:end); v=v1+j*v2

10 years ago | 0

| accepted

Answered
how can I run an old m-file in new version of MATLAB?
Check the error message, and replace the functions that are not available in the newest version

10 years ago | 0

Answered
How to get all values S and t in same matrix m?
m=[] for S=1:0.1:10; t=1.1346*log((-0.6*S)+7)-(0.0651*log(S)); if t>=0 S; t; m=[m; t S] else end end You c...

10 years ago | 0

| accepted

Answered
when i run this program shows the error to reshape no of elemens must not change
Before writing |outImg = reshape(img , [256 25,6]);| have you checked the size of img?

10 years ago | 0

Answered
How to change axes linewidth?
set(gca,'linewidth',6)

10 years ago | 14

Answered
Compare Vectors of Different Sizes and print the results
setdiff(A,[B,C,D])

10 years ago | 0

Answered
How can I delay a figure window?
use pause(n) , n is the number of seconds

10 years ago | 0

Answered
Problem with the mean of index
You can calculate the mean without a for loop A=rand(361,361,432); mina=mean(A(:)) % the mean off all the matrix min1=me...

10 years ago | 0

| accepted

Answered
Hello there, I have question that I need to solve
You can't compare the two files, that doesn't make sens, but you can compare their content, load the data from the Excell file b...

10 years ago | 0

| accepted

Answered
Write an image name to particular folder using imwrite
Use fname=fullfile(path,fname);

10 years ago | 1

Answered
how to automate the count of consecutive values in a cell array
x={'2' '3' '4' '5'; '2' '2' '3' '1'; '2' '2' '2' '1';'1' '2' '3' '3'; '1' '2' '3' '4'}; [n,m]=size(x) for k=2:m a=x(:,1...

10 years ago | 0

| accepted

Answered
How to find max,min,average values from a cell array?
A={ num2cell(rand(1,4)) num2cell(rand(1,5))} out1=cellfun(@(x) min(cell2mat(x)),A) out2=cellfun(@(x) max(cell2mat(x)),A) o...

10 years ago | 0

| accepted

Answered
Can I transfer my license from a 32-bit computer to a 64-bit computer?
You can do it. All your codes will work

10 years ago | 0

Answered
fn=['D:/code name of dataset/A' num2str(n) '_' num2str(m) '_' num2str(q) '.bmp']; In this command error shows that is unexpected Matlab expression so how remove this error?
n=5 m=4 q=1 out=['D:/code name of dataset/A' num2str(n) '_' num2str(m) '_' num2str(q) '.bmp'] The code works fine, you p...

10 years ago | 0

Answered
How do I force matlab to return multiple solutions for a periodic function?
You can find yourself all the other solutions, Matlab gets the one in the intervall [0 180], in your case the solution is 1. The...

10 years ago | 0

Answered
I have a data set of 400 columns and 644rows .I need to select columns 1,2,11,12,21,22,.....381,382,391,392 or move these particular columns in to a matrix.how can i write code for this in matlab
A=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20] idx=[1,2,11,12] out1=A(idx) out2=A(setdiff(1:numel(A),idx))

10 years ago | 0

Answered
Is it possible to convert a Simulink Model into a Matlab function?
You can run your simulink model from any script by the command <http://www.mathworks.com/help/simulink/slref/sim.html sim>, for ...

10 years ago | 0

| accepted

Answered
Custom colored bar graph for a vector
x=[1 2 3 4 5 6 7 8 9 10 11 12 13 14 15] y=[1 2 3 1 1 1 2 3 3 1 3 3 3 2 3] cl='rgyb' for k=1:numel(x) bar(x(k),y(k),'Fa...

10 years ago | 0

| accepted

Answered
Is it possible to create a vector with a specified number of ones? eg . V=[ 1 1 1 1 0 0 0 0 0 0 0 0]
َََََA=zeros(1,12) A(1:4)=1 Or A=[ones(1,4) zeros(1,8)]

10 years ago | 0

Answered
How can i solve this function below ?
Save the function below as msd.m function xdot = msd(t,x) % Function file for mass with spring and damping. % Position i...

10 years ago | 0

| accepted

Answered
How do I fix the error Function definitions are not permitted at the prompt or in scripts.
Write this part of code and save it as fact.m function y = fact(n) if n<=1 y=1; else y=n*fact(n-1) end the...

10 years ago | 1

| accepted

Answered
3D Plot for X, Y and Z co-ordinate data ponts
Look at this example x=1:10 y=1:10 z=1:10 w=randi([100 200],1,10) c=max(w)-min(w) w1=(w-min(w))/c for k=1:10 s...

10 years ago | 0

Answered
function to count number of '1' in each row and column
M = [ 0 1 1 1 0 0 1 0 1 1 1 0 1 1 0 1 0 1 1 0 1 1 0 0 1 1 1 1 0 1 1 1 1 1 1 0 1 0 0 1 0 0 1 0 0 1 1 1 1 0 ...

10 years ago | 1

| accepted

Answered
Trouble plotting 3-D graphs Vector question
Fn and Teta are different sizes

10 years ago | 0

Load more