Réponse apportée
'Linewidth' property with Histogram function
stairs(counts, 'LineWidth', 2)

plus de 10 ans il y a | 0

Réponse apportée
Error: subscripted assignment dimension mismatch for loop
The error occurs because you try to assign an image (2D) to a row (1D) img(i,:). You can use img{i} = imread(mhi_fig); ...

plus de 10 ans il y a | 0

Réponse apportée
How do I find variable values for functions?
Use logical indexing: time_where_height_is_zero = time(height == 0)

plus de 10 ans il y a | 0

Réponse apportée
how to plot a histogram of repeated values in a matrix?
This computes how often each value occurs [a b c] = unique(X); [X(b) histc(c, 1:max(c))]

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
How to find the median of one part of a column being in a while loop?
A solution without a while loop; if now values are given for the year, NaN is assigned: for i = 1:size(A1,1) A1(i,2)...

plus de 10 ans il y a | 0

Réponse apportée
norm() - Subscript indices must either be real positive integers or logicals.
Make sure that you have not used any of these as a variable which norm which abs which acosd which dot

plus de 10 ans il y a | 2

| A accepté

Réponse apportée
'Fill' function with coloured lines instead of filling area
http://blogs.mathworks.com/pick/2011/07/15/creating-hatched-patches/

plus de 10 ans il y a | 0

Réponse apportée
deletion of first row in the matrix
Use ; to separate rows Ki = [25 35; 56 41; 85 78]; Delete first row Ki(1,:) = [];

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
How i display matrix ?
disp(Ki(:,2))

plus de 10 ans il y a | 1

Réponse apportée
How can delete same rows and colums from three 2D matrices?
ind = isnan(A); longitude(:, any(ind)) = []; % delete columns longitude(any(ind'), :) = []; % delete rows

plus de 10 ans il y a | 0

Réponse apportée
How do I change the matlab so that data is written in one column and several lines?
I do not know of a "standard to record the data of a variable in a row and multiple columns"; what application are you referring...

plus de 10 ans il y a | 0

Réponse apportée
what is the simplest way to add two vectors if size is unknown?
You can use the colon operator : to convert the 1XN or Nx1 vectors v and u to Nx1 and then add both x = v(:) + u(:);

plus de 10 ans il y a | 1

Réponse apportée
How can I know if my license includes Matlab Compiler (SDK) or not?
ver

plus de 10 ans il y a | 0

Réponse apportée
how to get the final shape of a function after you got the variables?
X = [1 2 3]; % sample values X(1) = 1, X(2) = 2, X(3) = 3; % evaluate function for these values f1= [-3*X(1)+X(2)+X(2).^3; ...

plus de 10 ans il y a | 0

Réponse apportée
Hi Everyone! I'm trying to have a for loop that will repeat the question when the input value is greater than or less than to required value
This results in a string w of v characters: v=input('NUMBER OF KEYS TO ENTER: '); w=input('ENTER KEY/S: ' ,'s'); while l...

plus de 10 ans il y a | 0

Réponse apportée
Vector Matrix multiplication (Row wise)
L = L.*repmat(V, [1 N]);

plus de 10 ans il y a | 1

| A accepté

Réponse apportée
Binary table - counting bits in rows
table= dec2bin(0:(2^4-1)) - '0'; Nones = sum(table, 2); table(Nones==2, :)

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
create n k matrix in matlab
If E, A, L are matrices and the ith stiffness matrix is just the scalar s = E(i)*A(i)/L(i)) multiplied with matrix [1 -1; -1 1]...

plus de 10 ans il y a | 0

Réponse apportée
create an Binary matrix table
That's easy: table= dec2bin(0:(2^4-1)) - '0';

plus de 10 ans il y a | 4

| A accepté

Réponse apportée
Currency conversion using matlab script - i have no idea how to start with this
SGD2X = [0.70991 0.23 5.3444 9.000]; % put the actual values here to convert from Singapore Dollars to USD, British Pound et...

plus de 10 ans il y a | 0

Réponse apportée
Pixel is a 2D or 3D? please answer me. thanks
A pixel is a "picture element", or the basic element of a digital image. The most common image formats are binary images, where...

plus de 10 ans il y a | 1

Réponse apportée
Plotting a graph in matlab
If you have the values in a matrix X, use plot(X')

plus de 10 ans il y a | 0

Réponse apportée
How to define a multivariable function (for instance an anonymous function) of a number of variables that varies according to the size of an array variable?
Define your function as function y = myfun(a,b) A = [-a a; a -a]; % sample definition B = rand(2); C = [-2*b b; ...

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
How do I write a function that behaves differently according to the number of input arguments?
Use varargin as the parameter of your function that collects all arguments as elements of a cell array. function myplot(vara...

plus de 10 ans il y a | 0

Réponse apportée
Why am I getting an error "vectors must be the same length"
It's a typo; your last x must be x1 plot(x, f(x), x1, f(x1))

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
What is the problem with the heaviside function?
The error means that Matlab cannot find the heaviside function. Try which heaviside to locate the function. The heavisid...

plus de 10 ans il y a | 1

Réponse apportée
can anyone suggest a good way to save & again read a image that will loss lowest possible information?
Use save and load

plus de 10 ans il y a | 0

| A accepté

Réponse apportée
Some question about logic of programm
The first index you need is the row of the first occurrence of your desired number num in column 1 of W num = 1; ind1 = ...

plus de 10 ans il y a | 1

| A accepté

Réponse apportée
how to write Loops in Functions?
It is not entirely clear to me what you want to achieve. If you want to use Fx instead of x, write F=[Fx(1)+Fx(2); 3*Fx(...

plus de 10 ans il y a | 0

Charger plus