Respondida
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

más de 10 años hace | 0

Respondida
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

más de 10 años hace | 0

| aceptada

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

más de 10 años hace | 1

| aceptada

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

más de 10 años hace | 0

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

más de 10 años hace | 1

| aceptada

Respondida
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

más de 10 años hace | 1

| aceptada

Respondida
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

más de 10 años hace | 0

| aceptada

Respondida
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

más de 10 años hace | 0

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

más de 10 años hace | 0

| aceptada

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

más de 10 años hace | 0

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

más de 10 años hace | 14

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

más de 10 años hace | 0

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

más de 10 años hace | 0

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

más de 10 años hace | 0

| aceptada

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

más de 10 años hace | 0

| aceptada

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

más de 10 años hace | 1

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

más de 10 años hace | 0

| aceptada

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

más de 10 años hace | 0

| aceptada

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

más de 10 años hace | 0

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

más de 10 años hace | 0

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

más de 10 años hace | 0

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

más de 10 años hace | 0

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

más de 10 años hace | 0

| aceptada

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

más de 10 años hace | 0

| aceptada

Respondida
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)]

más de 10 años hace | 0

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

más de 10 años hace | 0

| aceptada

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

más de 10 años hace | 1

| aceptada

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

más de 10 años hace | 0

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

más de 10 años hace | 1

| aceptada

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

más de 10 años hace | 0

Cargar más