Beantwortet
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

mehr als 10 Jahre vor | 0

Beantwortet
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

mehr als 10 Jahre vor | 0

| akzeptiert

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

mehr als 10 Jahre vor | 1

| akzeptiert

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

mehr als 10 Jahre vor | 0

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

mehr als 10 Jahre vor | 1

| akzeptiert

Beantwortet
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

mehr als 10 Jahre vor | 1

| akzeptiert

Beantwortet
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

mehr als 10 Jahre vor | 0

| akzeptiert

Beantwortet
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

mehr als 10 Jahre vor | 0

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

mehr als 10 Jahre vor | 0

| akzeptiert

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

mehr als 10 Jahre vor | 0

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

mehr als 10 Jahre vor | 14

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

mehr als 10 Jahre vor | 0

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

mehr als 10 Jahre vor | 0

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

mehr als 10 Jahre vor | 0

| akzeptiert

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

mehr als 10 Jahre vor | 0

| akzeptiert

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

mehr als 10 Jahre vor | 1

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

mehr als 10 Jahre vor | 0

| akzeptiert

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

mehr als 10 Jahre vor | 0

| akzeptiert

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

mehr als 10 Jahre vor | 0

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

mehr als 10 Jahre vor | 0

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

mehr als 10 Jahre vor | 0

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

mehr als 10 Jahre vor | 0

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

mehr als 10 Jahre vor | 0

| akzeptiert

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

mehr als 10 Jahre vor | 0

| akzeptiert

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

mehr als 10 Jahre vor | 0

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

mehr als 10 Jahre vor | 0

| akzeptiert

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

mehr als 10 Jahre vor | 1

| akzeptiert

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

mehr als 10 Jahre vor | 0

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

mehr als 10 Jahre vor | 1

| akzeptiert

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

mehr als 10 Jahre vor | 0

Mehr laden