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

más de 9 años hace | 0

Respondida
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

más de 9 años hace | 0

| aceptada

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

más de 9 años hace | 0

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

más de 9 años hace | 6

Respondida
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?

más de 9 años hace | 0

| aceptada

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

más de 9 años hace | 1

| aceptada

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

más de 9 años hace | 0

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

más de 9 años hace | 0

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

más de 9 años hace | 1

| aceptada

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

más de 9 años hace | 2

| aceptada

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

más de 9 años hace | 0

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

más de 9 años hace | 1

| aceptada

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

más de 9 años hace | 0

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

más de 9 años hace | 0

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

más de 9 años hace | 0

| aceptada

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

más de 9 años hace | 2

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

más de 9 años hace | 0

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

más de 9 años hace | 1

| aceptada

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

más de 9 años hace | 0

| aceptada

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

más de 9 años hace | 0

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

más de 9 años hace | 0

| aceptada

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

más de 9 años hace | 0

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

más de 9 años hace | 0

| aceptada

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

más de 9 años hace | 0

| aceptada

Respondida
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;

más de 9 años hace | 0

| aceptada

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

más de 9 años hace | 0

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

más de 9 años hace | 0

| aceptada

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

más de 9 años hace | 0

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

más de 9 años hace | 0

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

más de 9 años hace | 0

Cargar más