解決済み


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年以上 前

さらに読み込む