Respondida
Create and combine quiver and contour plots
contourf(x,y,sqrt(vx.^2 + vy.^2));

más de 11 años hace | 0

Respondida
Writing function that ether gives as a result or that uses a two-dimensional array as input?
It is very easy to use arrays in Matlab. Just open a new file "myfun.m", define a function function y = myfun(x) y = 2*y; ...

más de 11 años hace | 0

Respondida
Help regarding "Attempted to access gainx(0.0101768); index must be a positive integer or logical." error.
Matlab needs * to denote multiplikation: gainx = 1 - gainx*(1-R); Does this solves your problem?

más de 11 años hace | 1

| aceptada

Respondida
Combined value of different arrays with constraints
result = nan(size(p_th)); for t=1:length(p_th) if ismember(p_th(t), A) result(t) = p_th(t) - p_c(t) - constant_a; ...

más de 11 años hace | 0

| aceptada

Respondida
A Problem with log10
You overwrite Matlabs log10 function with your log10 matrix; rename it and everything should work fine.

más de 11 años hace | 1

| aceptada

Respondida
Remove element from cell array completely
handles.guideGUI(15) = [];

más de 11 años hace | 2

| aceptada

Respondida
How to create a 2D circular intensity plot?
Define your X Y Cartesian coordinates with meshgrid, convert to radius and angle R = sqrt(X^2 + Y^2); A = atan2(Y, X); ...

más de 11 años hace | 1

Respondida
Specify file to be called from command line (.m/.p)
No, you can't run the mfile if a pfile of the same name is in the same directory as the mfile: When you call a P-code file, ...

más de 11 años hace | 1

| aceptada

Respondida
How to sort file when reading them with dir ?
Convert each filename to the corresponding number (strip leading doc_ and trailing .txt, then use double); next, sort the number...

más de 11 años hace | 0

Respondida
How to skip a parameter in a function? ex: A = fread(obj,size,'precision') without size.
Supply an empty argument; the function should use the default instead: fread(fid, [], 'uint8') (for fread you can just dr...

más de 11 años hace | 2

Respondida
Can you modify the code provided on given link.?
Just convolve your data with the filter F = [0 1 0; 1 0 1; 0 1 0]/4; You can use imfilter for the convolution.

más de 11 años hace | 0

| aceptada

Respondida
Image analysis with 688x520 images works, but same program produces nonsense for 1101x832 images
Maybe there are some variables set from your first analysis. Use clear and rerun your second analysis.

más de 11 años hace | 0

Respondida
Can you help me about this problem?
Lines like r21y -r21x -r22y r22x 0 0 0 0 1; have just 9 colums: r21y -r21x -r22y r22x 0 0...

más de 11 años hace | 0

Respondida
How to store loop values into array?
You can use cell arrays to store variables of different sizes. Like V{i}(j)= y(j+1) - y(j); And something is probably wro...

más de 11 años hace | 0

Respondida
find cannot read all values in .mat file
Try lo=[ -5.2:0.1:8]'; la=[49:-0.1:42.4]'; to get _all_ values at 0.1 spacing.

más de 11 años hace | 0

Respondida
what is the difference between YCbCr and YCuCv models?
From http://en.wikipedia.org/wiki/YCbCr Y′CbCr is often confused with the YUV color space, and typically the terms YCbCr and...

más de 11 años hace | 0

Respondida
how to convert RGB image into YCuCv model by using reversible colour transform ?
See https://en.wikipedia.org/wiki/JPEG_2000#Color_components_transformation I = imread('peppers.png'); R = I(:,:,1); G = ...

más de 11 años hace | 0

Respondida
how to extract Y channel from YCuCv image?
See https://en.wikipedia.org/wiki/JPEG_2000#Color_components_transformation I = imread('peppers.png'); R = I(:,:,1); G =...

más de 11 años hace | 1

Respondida
How to set up Compiler Configuration?
When you run mex -setup you generate a personal mexopts.bat in your prefdir. Copy this to the system default lccopts.bat should ...

más de 11 años hace | 0

| aceptada

Respondida
How do I use a for-loop to do fft and plot the power?
May be that's because they are the same? I get different curves using random input. BTW: note that n is always 1000 in your c...

más de 11 años hace | 0

| aceptada

Respondida
How can I write a program to make someone input a 6 digit number and show a result of the summation of the 6 digits?
Convert the number to a string, and then convert each character of the string to the corresponding value (using arrayfun to work...

más de 11 años hace | 0

Respondida
Subscripted assignment dimension mismatch
The term exp(-UFR*i) is indepent of t, so you could compute it as for i = 1:length(extrapolatedmaturities) expUFR(i) = e...

más de 11 años hace | 0

| aceptada

Respondida
find cannot read all values in .mat file
If you change the number of intermediate values in your linspace function you probably get some values that are not contained in...

más de 11 años hace | 0

Respondida
Strange Undefined variable or control error for a function
Have you double-checked that your control.m is seen by Matlab? What does >> which control shows before you type >> c...

más de 11 años hace | 0

Respondida
How to detect SURF features on image in matlab?
You probably have to convert the image to double I = im2double(I); or (without the Image Processing TB) I = double(...

más de 11 años hace | 0

Respondida
Import and format CSV file
You can use num= 48.68; num1= floor(num); num2= (num - num1)*1000;

más de 11 años hace | 0

Respondida
How do I import Data from a different folder?
Easy as addpath('C:\xx\xx\data_folder\composite1.dat')

más de 11 años hace | 0

Respondida
Fzero with defined scalar parameters
If FUN is parameterized, you can use anonymous functions to capture the problem-dependent parameters. Suppose you want to ...

más de 11 años hace | 3

Respondida
Distance from point to plane
Plane= [-37.7423 -74.6518 1.6262 -33.1443 -72.8633 1.6262 -33.6488 -70.8894 62.1935 -38.2...

más de 11 años hace | 0

Cargar más