문제를 풀었습니다


Check if number exists in vector
Return 1 if number _a_ exists in vector _b_ otherwise return 0. a = 3; b = [1,2,4]; Returns 0. a = 3; b = [1,...

12년 초과 전

문제를 풀었습니다


Sum of diagonal of a square matrix
If x = [1 2 4; 3 4 5; 5 6 7] then y should be the sum of the diagonals of the matrix y = 1 + 4 + 7 = 12

12년 초과 전

답변 있음
which is faster in matlab?
According to me, Excel is better as it gives more control over range of data you will need to read, It also has ample scope to f...

12년 초과 전 | 0

답변 있음
What is wrong with the code?
Is it not save(filename,variables,'-append') with a '-append' instead of just 'append'?

12년 초과 전 | 0

답변 있음
why its giving error? Its saying cant read A1(2.3), its not logical
all Indices in matlab must be positive integers. your h is 1.3 so for all i values it will try to access A1(i.3) which is not c...

12년 초과 전 | 0

답변 있음
how to multiply two sinewaves of different amplitude and frequency in MATLAB/simulink
t=0:0.01:10 Eqn1=a1*sin(w1*t); Eqn2=a2*sin(w1*t); as you might know, Eqn1 and Eqn2 are matrices. Eqn1.*Eqn2 will mult...

12년 초과 전 | 0

| 수락됨

답변 있음
How to extend a GUI after clicking a push button?
look at this. Hopefully Useful.. <http://www.mathworks.in/matlabcentral/fileexchange/25938-multiple-tab-gui> and this GUI ...

12년 초과 전 | 1

답변 있음
How can I preprocess a value assigned to a variable?
you can use eval(['var_',num2str(variable_number),'=',num2str(variable_number)]) But as pointed out in the link shared abov...

12년 초과 전 | 0

답변 있음
How to call simulink parameter into a GUI ?
Suppose you have a constant block in your simulink model, and you have an edit box and push button in your gui. you put some ...

12년 초과 전 | 0

답변 있음
Howto find out the distance travelled by a point on a rotating ceiling fan?
between two continuous frames, find the distance(d). You ll know the frame rate. 's' in seconds will be the time between frames(...

12년 초과 전 | 0

문제를 풀었습니다


Which quadrant?
Given a complex number, output quadrant 'I' 'II' 'III' or 'IV' | II | I | ...

12년 초과 전

문제를 풀었습니다


Make a random, non-repeating vector.
This is a basic MATLAB operation. It is for instructional purposes. --- If you want to get a random permutation of integer...

12년 초과 전

문제를 풀었습니다


Back to basics 25 - Valid variable names
Covering some basic topics I haven't seen elsewhere on Cody. Given a string, return true if it is a valid MATLAB variable nam...

12년 초과 전

문제를 풀었습니다


Find max
Find the maximum value of a given vector or matrix.

12년 초과 전

문제를 풀었습니다


Add two numbers
Calculate the sum of two numbers. Example input = [2 3] output = 5

12년 초과 전

답변 있음
GUIDE "disconnected" from editor
open the working GUI. Make sure in the Tools-> GUI Options the Generate Fig File and m File Option is selected and save the GUI ...

12년 초과 전 | 1

| 수락됨

문제를 풀었습니다


Rotate a Matrix
Input a Matrix x, Output y is the matrix rotating x 90 degrees clockwise

12년 초과 전

문제를 풀었습니다


Whether the input is vector?
Given the input x, return 1 if x is vector or else 0.

12년 초과 전

문제를 풀었습니다


Find the largest value in the 3D matrix
Given a 3D matrix, A, find the largest value. E.g. >> A = 1:9; >> A=reshape(A,[3 1 3]); >> islargest(A) ans = 9

12년 초과 전

문제를 풀었습니다


Magic!
Check whether the input matrix is a normal magic square: <http://en.wikipedia.org/wiki/Magic_square> Output the logical va...

12년 초과 전

문제를 풀었습니다


Create a row array using double colon operator
Create a row array from 9 to 1, using the double colon operator.

12년 초과 전

문제를 풀었습니다


Set the array elements whose value is 13 to 0
Input A either an array or a vector (which can be empty) Output B will be the same size as A . All elements of A equal to 13...

12년 초과 전

문제를 풀었습니다


Who knows the last digit of pi?
There is only one man who knows the last digit of pi, who is that man? Give the name of that man, who, by popular believe, can ...

12년 초과 전

문제를 풀었습니다


Compute a dot product of two vectors x and y
x and y are input vectors, d is a number and contains their dot product

12년 초과 전

문제를 풀었습니다


Interpolator
You have a two vectors, a and b. They are monotonic and the same length. Given a value, va, where va is between a(1) and a(end...

12년 초과 전

답변 있음
??? Error using ==> interp1 at 261 The values of X should be distinct. Error in ==> StallPower_20131029_S809 at 10 c=interp1(rc_table(:,2),rc_table(:,3),rad);
For your data it works fine. All it says is values in X must be distinct and monotonously increasing. Your X is rc_table(:...

12년 초과 전 | 0

| 수락됨

답변 있음
Browse option In matlab GUI
yes.. cd should do. on the Browse button's callback, read the value from the text box. In the Button's callback TextPa...

12년 초과 전 | 0

답변 있음
How to insert a matrix to another matrix ?
Your question is little unclear. If you want Matrix B's first column replaced by A then, A is 5X1 B is 5X5 B=[A B(:,2:end...

12년 초과 전 | 0

문제를 풀었습니다


How to find the position of an element in a vector without using the find function
Write a function posX=findPosition(x,y) where x is a vector and y is the number that you are searching for. Examples: fin...

12년 초과 전

문제를 풀었습니다


Sort a list of complex numbers based on far they are from the origin.
Given a list of complex numbers z, return a list zSorted such that the numbers that are farthest from the origin (0+0i) appear f...

12년 초과 전

더 보기