Beantwortet
'Linewidth' property with Histogram function
stairs(counts, 'LineWidth', 2)

fast 11 Jahre vor | 0

Beantwortet
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); ...

fast 11 Jahre vor | 0

Beantwortet
How do I find variable values for functions?
Use logical indexing: time_where_height_is_zero = time(height == 0)

fast 11 Jahre vor | 0

Beantwortet
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))]

fast 11 Jahre vor | 0

| akzeptiert

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

fast 11 Jahre vor | 0

Beantwortet
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

fast 11 Jahre vor | 2

| akzeptiert

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

fast 11 Jahre vor | 0

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

fast 11 Jahre vor | 0

| akzeptiert

Beantwortet
How i display matrix ?
disp(Ki(:,2))

fast 11 Jahre vor | 1

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

fast 11 Jahre vor | 0

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

fast 11 Jahre vor | 0

Beantwortet
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(:);

fast 11 Jahre vor | 1

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

fast 11 Jahre vor | 0

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

fast 11 Jahre vor | 0

Beantwortet
Vector Matrix multiplication (Row wise)
L = L.*repmat(V, [1 N]);

fast 11 Jahre vor | 1

| akzeptiert

Beantwortet
Binary table - counting bits in rows
table= dec2bin(0:(2^4-1)) - '0'; Nones = sum(table, 2); table(Nones==2, :)

fast 11 Jahre vor | 0

| akzeptiert

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

fast 11 Jahre vor | 0

Beantwortet
create an Binary matrix table
That's easy: table= dec2bin(0:(2^4-1)) - '0';

fast 11 Jahre vor | 4

| akzeptiert

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

fast 11 Jahre vor | 0

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

fast 11 Jahre vor | 1

Beantwortet
Plotting a graph in matlab
If you have the values in a matrix X, use plot(X')

fast 11 Jahre vor | 0

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

fast 11 Jahre vor | 0

| akzeptiert

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

fast 11 Jahre vor | 0

Beantwortet
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))

fast 11 Jahre vor | 0

| akzeptiert

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

fast 11 Jahre vor | 1

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

fast 11 Jahre vor | 1

| akzeptiert

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

fast 11 Jahre vor | 0

Mehr laden