Programming Languages:
MATLAB
Spoken Languages:
English
MATLAB
Spoken Languages:
English
Feeds
답변 있음
How to plot every column of matrix into a different graphic but in one figure
% let us suppose your matrix is A,and you want toplot all the columns of A with espect to dome other variable. You havent mentio...
How to plot every column of matrix into a different graphic but in one figure
% let us suppose your matrix is A,and you want toplot all the columns of A with espect to dome other variable. You havent mentio...
4년 초과 전 | 1
답변 있음
Comparing two arrays +
clc clear all a=[10 20 30 40]; b=[20 30 30 10]; for i=1:length(a) if a(i)>=b(i) c(i)=a(i); else ...
Comparing two arrays +
clc clear all a=[10 20 30 40]; b=[20 30 30 10]; for i=1:length(a) if a(i)>=b(i) c(i)=a(i); else ...
4년 초과 전 | 0
답변 있음
Write a function called minimax that takes M, a matrix input argument and returns mmr, a row vector containing the absolute values of the difference between the maximum and minimum valued elements in each row. As a second output argument called mmm,
function [mmr,mmm] = minimax(M) a=max(M'); b=min(M'); mmr=a-b; c=max(a); d=min(b); mmm=c-d; end % This is what i came up...
Write a function called minimax that takes M, a matrix input argument and returns mmr, a row vector containing the absolute values of the difference between the maximum and minimum valued elements in each row. As a second output argument called mmm,
function [mmr,mmm] = minimax(M) a=max(M'); b=min(M'); mmr=a-b; c=max(a); d=min(b); mmm=c-d; end % This is what i came up...
4년 초과 전 | 11
답변 있음
How can we store many matrices(z) from for loop in a single matrix D(say) in my problem.
% If you want your matrices z1,z2,z3 to be stored in side by side ie D=[z1 z2 z3] the following code helps clc clear all x=[1...
How can we store many matrices(z) from for loop in a single matrix D(say) in my problem.
% If you want your matrices z1,z2,z3 to be stored in side by side ie D=[z1 z2 z3] the following code helps clc clear all x=[1...
4년 초과 전 | 1
답변 있음
Create a matrix with only the rows indexed by a multiple of N of another matrix.
clc clear all x1=randi([0,10],[9,2]) x2=[] for i=1:3:length(x1) x2=[x2; x1(i,:)] end % this will work
Create a matrix with only the rows indexed by a multiple of N of another matrix.
clc clear all x1=randi([0,10],[9,2]) x2=[] for i=1:3:length(x1) x2=[x2; x1(i,:)] end % this will work
4년 초과 전 | 1
답변 있음
Fibonacci sequence with loop
clc clear all Fibonacci(1000) function fibn=Fibonacci(n) fibn=[1 1]; i=3; while fibn(i-1)<n fibn(i)=fibn(i-2)+fibn(i-...
Fibonacci sequence with loop
clc clear all Fibonacci(1000) function fibn=Fibonacci(n) fibn=[1 1]; i=3; while fibn(i-1)<n fibn(i)=fibn(i-2)+fibn(i-...
4년 초과 전 | 1
| 수락됨
답변 있음
Fibonacci sequence with loop
clc clear all Fibonacci(10) function fibn=Fibonacci(n) % we are defining a function Fibonacci fibn=[1 1] ...
Fibonacci sequence with loop
clc clear all Fibonacci(10) function fibn=Fibonacci(n) % we are defining a function Fibonacci fibn=[1 1] ...
4년 초과 전 | 0
답변 있음
I need help with for loops
clc clear all A = [-100 20 50 -2 -55 3 40 -27] for i = 1:length(A) if A(i) > 0 B(i) = {'true'}; else ...
I need help with for loops
clc clear all A = [-100 20 50 -2 -55 3 40 -27] for i = 1:length(A) if A(i) > 0 B(i) = {'true'}; else ...
4년 초과 전 | 0
답변 있음
I need help with for loops
clc clear all A = [-100 20 50 -2 -55 3 40 -27] B=zeros(1,length(A)) for i = 1:length(A) if A(i) > 0 B(i) = tru...
I need help with for loops
clc clear all A = [-100 20 50 -2 -55 3 40 -27] B=zeros(1,length(A)) for i = 1:length(A) if A(i) > 0 B(i) = tru...
4년 초과 전 | 0
답변 있음
How to Log10 X and Y
clc clear all x=[1 2 3 4] y=[5 7 9 9] log10(x) log10(y) this code worked well. Your question is littel bit concusing. I...
How to Log10 X and Y
clc clear all x=[1 2 3 4] y=[5 7 9 9] log10(x) log10(y) this code worked well. Your question is littel bit concusing. I...
4년 초과 전 | 1
| 수락됨
답변 있음
How can I plot 3 variables on y axis for the same variable on x axis in one plot?
you can use " hold on " command. you can write your code in the following manner. plot(x,y1) hold on plot(x,y2) hold on pl...
How can I plot 3 variables on y axis for the same variable on x axis in one plot?
you can use " hold on " command. you can write your code in the following manner. plot(x,y1) hold on plot(x,y2) hold on pl...
4년 초과 전 | 1
질문
I dont understand why this function is not working.
The file cars.mat contains a table named cars with variables Model, MPG, Horsepower, Weight, and Acceleration for several classi...
4년 초과 전 | 답변 수: 1 | 0
1
답변답변 있음
i need help to compelete my code
% Bro This code will work, if you have any more doubts please feel free to message me. clc clear all A=[2 1 1 3 2 3 ...
i need help to compelete my code
% Bro This code will work, if you have any more doubts please feel free to message me. clc clear all A=[2 1 1 3 2 3 ...
4년 초과 전 | 0
답변 있음
how to generate a matrix in a nested looped
% If you have any more doubts regardng this wuestion you can message me. hope you will unerstand this clc clear all rows=in...
how to generate a matrix in a nested looped
% If you have any more doubts regardng this wuestion you can message me. hope you will unerstand this clc clear all rows=in...
4년 초과 전 | 0
답변 있음
how can ı find min value using for loop in matrice
clc clear all A=[2,4,5,7,4,3,5,6] % creating our required vector l=length(A) % finding the length of our ve...
how can ı find min value using for loop in matrice
clc clear all A=[2,4,5,7,4,3,5,6] % creating our required vector l=length(A) % finding the length of our ve...
4년 초과 전 | 0
답변 있음
removing columns and rows from very large matrix
% Generally we can choose which rows and columns to be deleated. Or we can chose which columns % and rows to be present. crea...
removing columns and rows from very large matrix
% Generally we can choose which rows and columns to be deleated. Or we can chose which columns % and rows to be present. crea...
4년 초과 전 | 0
답변 있음
write m script file or create matrix
A=zeros(2,4) % creaes a 2X4 matrix of zeros B=ones(3,4) % creates a 3X4 matrix of ones. c=[A;B] % combinng thoe tw...
write m script file or create matrix
A=zeros(2,4) % creaes a 2X4 matrix of zeros B=ones(3,4) % creates a 3X4 matrix of ones. c=[A;B] % combinng thoe tw...
4년 초과 전 | 1
| 수락됨
답변 있음
Find number that are above a certain number.
% I have taken a random matrix M of size 8X8 in the in the place of M you can insert your matrix. % it took 3 hrs for me compl...
Find number that are above a certain number.
% I have taken a random matrix M of size 8X8 in the in the place of M you can insert your matrix. % it took 3 hrs for me compl...
4년 초과 전 | 0
| 수락됨
답변 있음
Is there a list of MatLab tutors?
Yes .I can Tech you MATLAB. i am Assistant proessor in an university.i have been teachng MATLAB for 8 years.you can contact me m...
Is there a list of MatLab tutors?
Yes .I can Tech you MATLAB. i am Assistant proessor in an university.i have been teachng MATLAB for 8 years.you can contact me m...
4년 초과 전 | 0
답변 있음
solving a for loop error
In MATLAB for a vector the index start from 'one'(1) not 'zero'(0). supposeif you have a vector v=[2,4,6,3,9,7] you can axce...
solving a for loop error
In MATLAB for a vector the index start from 'one'(1) not 'zero'(0). supposeif you have a vector v=[2,4,6,3,9,7] you can axce...
4년 초과 전 | 0
답변 있음
Write a function called max_sum that takes v, a row vector of numbers, and n, a positive integer as inputs. The function needs to find the n consecutive elements of v whose sum is the largest possible.
function [summa,index] = max_sum(v,n) % defining a function with name "max_sum", input augements are (v,n) and out put augemnt...
Write a function called max_sum that takes v, a row vector of numbers, and n, a positive integer as inputs. The function needs to find the n consecutive elements of v whose sum is the largest possible.
function [summa,index] = max_sum(v,n) % defining a function with name "max_sum", input augements are (v,n) and out put augemnt...
4년 초과 전 | 2