Beantwortet
Hello, please help me with and advice about conditional statement
I would program it like this % compute Q1 with formula 1 ... Q1 = ... % compute Q2 with formula 2 ... Q2 =...

fast 10 Jahre vor | 0

Beantwortet
How to convert arrayfun to for loop
count = 27; Length = 1:count; for n = 0:count-1 Array(n+1,:) = circshift(Length, [0, -n]); end

fast 10 Jahre vor | 0

| akzeptiert

Beantwortet
sort a one dimensional array ascend and descend
It is consistent behaviour: You explicitly ask to sort a 1xn vector along the first dimension. I think it would be nice if Matla...

fast 10 Jahre vor | 0

Beantwortet
Creating a cell structure from directory file names
datedir = dir('directorygoeshere'); filenames = {datedir.name}:

fast 10 Jahre vor | 6

Beantwortet
How to plot a histogram from 0-255
I = imread('cameraman.tif'); imhist(I) shows values from 0 to 255. Do you change I after imread and before imhist?

fast 10 Jahre vor | 0

| akzeptiert

Beantwortet
help me to find two consecutive differentiation with respect to x?
If I remember my high-school algebra correctly, it's q = 3*(1-cos(pi*x/10))= 3 - 3*cos(pi/10*x) dq/dx = 3*sin(pi/10*x)*p...

fast 10 Jahre vor | 1

| akzeptiert

Beantwortet
Can I convert long binary strings into unique serial numbers of much shorter length?
You said that you generate the numbers, but you do not mention any constraints on the generation. Without any constraints, just ...

fast 10 Jahre vor | 0

Beantwortet
Running exe files in Linux
Try system(strcat('sim/CySim_solver sim/CySim', ' > out'))

fast 10 Jahre vor | 0

Beantwortet
Keep SURF features from many images
The most general form is [features{i}, valid_points{i}] = extractFeatures(a, points); if features is just a single numbe...

fast 10 Jahre vor | 1

| akzeptiert

Beantwortet
How do I construct a vector of complex numbers whose absolute value is not above 1?
You can generate a vector of complex number where the maximum absolute value is always 1: C = rand(1,10) + 1i*rand(1,10); ...

fast 10 Jahre vor | 2

| akzeptiert

Beantwortet
Index exceeds matrix dimensions.
What's the size of the A you read? It's probably less than 192. You can check using A = fscanf(f,'%g',[1 inf]); si...

fast 10 Jahre vor | 0

Beantwortet
Importing matlab data in a loop using keywords from a cell
a1 = {'K01 mainEEG.mat','K02 mainEEG.mat','K03 mainEEG.mat', 'K04 mainEEG.mat', 'K05 mainEEG.mat', 'K06 mainEEG.mat'} a2 = ...

fast 10 Jahre vor | 1

| akzeptiert

Beantwortet
How to save to different column array
Y(:, all(isnan(Y))) = [];

fast 10 Jahre vor | 0

Beantwortet
How can I remove left y-axis tick marks from the right y-axis, AND retain the top x-axis with MatLab 2015a?
So what's wrong with x=[1:100].';y=randn(100,1); % some dummy data to plot to make axes w/ differing ranges hAx=plotyy(...

fast 10 Jahre vor | 0

Beantwortet
how to get data of one image in a Matrix of images
X = abs(gaborResult{5,5});

fast 10 Jahre vor | 0

| akzeptiert

Beantwortet
My rectangle should have a determined color represented by a value
50 and 75 are not valid colorvalues in Matlab. Valid is an RGB triplet in the range [0, 1]. So I assumed that 50 and 75 is an in...

fast 10 Jahre vor | 2

Beantwortet
How to read map of RGB image by using imread?
If the value is empty, the image is not in a mapped format, i.e., RGB values are stored for each pixel (true color format), not ...

fast 10 Jahre vor | 0

Beantwortet
Matlab to extract the n th diagonals in a Matrix
d = [2 4]; A(sub2ind(size(A), d, d))

fast 10 Jahre vor | 1

| akzeptiert

Beantwortet
For loop not starting at 1
If you set Max(7) = something, values Max(1) til Max(6) are set to zero if Max does not exists, or it keeps the values in Max(1)...

fast 10 Jahre vor | 0

| akzeptiert

Beantwortet
draw all line between nodes
Simple as line(X, Y)

fast 10 Jahre vor | 0

Beantwortet
Display progression while reading a large tiff/image file
No, I don't think so. Waitbar needs a fraction of the total processing time, and you cannot implant this function into a build i...

fast 10 Jahre vor | 0

| akzeptiert

Beantwortet
Advantages and workarounds for using a main function for a project?
You're right: If use use build-in commands or Matlab function as your variable name, such as 'gamma', something strange happens:...

fast 10 Jahre vor | 0

Beantwortet
why does text change color when using saveas() or print()?
http://de.mathworks.com/help/matlab/creating_plots/save-figure-preserving-background-color.html

fast 10 Jahre vor | 0

| akzeptiert

Beantwortet
Draw sphere with slats
function hemispherewithstripes clf Nstripes = 12; stripecolor = 'r'; Nhemicircles = 2*Nstripes; r =...

fast 10 Jahre vor | 0

| akzeptiert

Beantwortet
Question about for loops and immultiply
A fast method to create a white square is Z(800,600)= 0; Z(275:325, 375:425) = 1;

fast 10 Jahre vor | 0

| akzeptiert

Beantwortet
Write a function (Not a built-in function) that converts a given number n in base 2 to base 10
There is a nice oneliner that solves the problem: base10 = 2.^(numel(n)-1:-1:0)*n(:); If you use it, your task is to und...

fast 10 Jahre vor | 0

Beantwortet
Is it possible to define the marker size of a rectangle (length/width)?
A rectangle is not among the markers. You have to draw it manually.

fast 10 Jahre vor | 0

| akzeptiert

Beantwortet
Move file into folder
Use the functional syntax of print to print directly to the dir print('-dpng', fullfile(newdir, ['Slice_' num2str(i) '.png'...

fast 10 Jahre vor | 0

Beantwortet
angdiff doesn't work as documented
Have a look which angdiff you use which angdiff it may be function different from the angdiff in the Robotics Toolbox.

fast 10 Jahre vor | 0

Beantwortet
calling the function dynamically - is it possible using eval or evalin
If you just have three functions, it's best to use [a,b,c] = data_sum(d,e) [a,b,c] = data_multiply(d,e) [a,b,c] = dat...

fast 10 Jahre vor | 0

Mehr laden