A résolu


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

plus de 12 ans il y a

A résolu


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

plus de 12 ans il y a

Réponse apportée
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...

plus de 12 ans il y a | 0

Réponse apportée
What is wrong with the code?
Is it not save(filename,variables,'-append') with a '-append' instead of just 'append'?

plus de 12 ans il y a | 0

Réponse apportée
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...

plus de 12 ans il y a | 0

Réponse apportée
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...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
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 ...

plus de 12 ans il y a | 1

Réponse apportée
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...

plus de 12 ans il y a | 0

Réponse apportée
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 ...

plus de 12 ans il y a | 0

Réponse apportée
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(...

plus de 12 ans il y a | 0

A résolu


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

plus de 12 ans il y a

A résolu


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

plus de 12 ans il y a

A résolu


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

plus de 12 ans il y a

A résolu


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

plus de 12 ans il y a

A résolu


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

plus de 12 ans il y a

Réponse apportée
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 ...

plus de 12 ans il y a | 1

| A accepté

A résolu


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

plus de 12 ans il y a

A résolu


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

plus de 12 ans il y a

A résolu


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

plus de 12 ans il y a

A résolu


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

plus de 12 ans il y a

A résolu


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

plus de 12 ans il y a

A résolu


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

plus de 12 ans il y a

A résolu


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

plus de 12 ans il y a

A résolu


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

plus de 12 ans il y a

A résolu


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

plus de 12 ans il y a

Réponse apportée
??? 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(:...

plus de 12 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 12 ans il y a | 0

Réponse apportée
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...

plus de 12 ans il y a | 0

A résolu


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

plus de 12 ans il y a

A résolu


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

plus de 12 ans il y a

Charger plus