Respondida
Using the piecewise function and integration function with fplot
syms t %set up capacitor graph V1 = (1/0.3e-9)*int(t*(5000/3),t); %Plot 0<t<3 V2 = (1/0.3e-9)*int(5e-3,t); %Plot 3<t<6 V3 = ...

más de 2 años hace | 0

Respondida
How do I set slider step value in Matlab?
SliderStep = 0.04 gives you 26 steps because the change in the slider's value from one click is (Max-Min)*SliderStep = (12-(-12...

más de 2 años hace | 2

| aceptada

Respondida
¿Como puedo resaltar la o las filas de una tabla en guide?
For a uitable in a figure (e.g., as created in GUIDE), in order to highlight certain rows, you can set the BackgroundColor prope...

más de 2 años hace | 0

| aceptada

Respondida
remove the white space on table
Adjust the ColumnWidth and/or width (i.e., Position(3)) of the uitable. The sum of the column widths should be about 16 pixels l...

más de 2 años hace | 0

| aceptada

Respondida
How can I get multiple values from a formula where the inputs are based on an array?
The problem is that MMES is a row vector, so SigmaFOS = max(MMES) is a scalar. See below for changes necessary to make SigmaFOS ...

más de 2 años hace | 0

| aceptada

Respondida
annotation with both "doublearrow" and "textblock", with same data units
% From: Jorg Woehl in "Specify annotation position with respect to x- and y-axes values?" hf = figure; x = 0:180; f = @(x) 0.0...

más de 2 años hace | 2

Respondida
using fprintf for matrix csv file
fid = fopen('Results.csv','wt'); ncol = 16; format_str = [repmat('%12.6f,',1,ncol) '\n']; for k = 1:100 A = (some equati...

más de 2 años hace | 0

Respondida
using fprintf with scientific notation
x = 101325; y = 33.814; fprintf('%+.5E',x) fprintf('%+.6e',y)

más de 2 años hace | 0

Respondida
Help using fprintf function
fprintf('%4d\t%6.4f\t%6.4f\t%6.4f\t%8.6f\t%8.6f\n',iter,xl,xu,xr,ea,es)

más de 2 años hace | 1

| aceptada

Respondida
What is "peaks" in tutorialApp?
peaks is a built-in function: <https://www.mathworks.com/help/matlab/ref/peaks.html>

más de 2 años hace | 0

Respondida
keep showing error at line 21 and the plot for CDF of capacity not appering?
There were several problems with the code. Compare the code below with yours to see the differences, and verify that my changes ...

más de 2 años hace | 1

| aceptada

Respondida
Replace strings with a different string and save the data
I assume that you want to replace the C's with the specified elements (e.g., Fe, Al, Ni) at random according to the specified pr...

más de 2 años hace | 0

Respondida
Record n values and once finished start replacing the oldest values with new ones
last10 = [0.99,0.99,1.01,1.00,1.02,0.99,0.99,1.05,1.08,1.10] new_value = 1.07; last10 = [last10(2:end) new_value]

más de 2 años hace | 0

Respondida
Get Array Number when value changes - Code does not work
Three things work differently when you have numbers vs when you have character vectors: 1.) You cannot unique() a cell array of...

más de 2 años hace | 0

Respondida
How can I change the state of multiple CheckBoxes in App designer?
I'll assume that the description, "tags like "app.CheckBox_X_Y", where X can have values from 1 to 50 and Y can have values from...

más de 2 años hace | 1

| aceptada

Respondida
Drag and Drop Custom Blocks on UIAxes in MATLAB
"What I want is to make these movable. Or maybe to pick and drop from a sidebar? Is it possible to do so that I can place obstac...

más de 2 años hace | 0

Respondida
How to delete file if if have contain wrong value
inputfolder = 'K:\Geonet data_2011\indata'; outputfolder = 'K:\Geonet data_2011\outdata'; numfiles = 1243; for k = 1:numfil...

más de 2 años hace | 0

Respondida
How can I rearrange the order of elements in a string given a matrix with positions?
v = ["e1","e5","e7","e3"]; % these two lines replace your existing loop: Order = compose("e%d",1:16); [~,Positions] = ismem...

más de 2 años hace | 0

Respondida
how do I concatenate mat files matlab
N = 200; % number of files (assumed to be named datafile_01.mat, _02.mat, ..., _10.mat, ..., _99.mat, _100.mat, ..., as you have...

más de 2 años hace | 0

| aceptada

Respondida
Kronocker product of iteration sequence
A=[1 0 0;1 1 0;0 1 0]; I=[1 0;0 1]; F2=[2 1;1 2]; Instead of using numbered variables R1, R2, R3, use a cell array: [N1,N2] ...

más de 2 años hace | 1

| aceptada

Respondida
How can I add title to plots before the loop
figure for i=1:10 ax1 = subplot(2,1,1) title(ax1,sprintf('%d',i)) ax2 = subplot(2,1,2); xlabel(...

más de 2 años hace | 0

Respondida
remove zero padding for binary vector and string
case 1 a=[1 0 0 1 0 1 1 1 1 1 0 0 1 0 1 0 0 1 0 0 0 0 0 1 1 1 1 1 1 0 1 0 1 0 1 0 1 0 1 0 0 0 1 1 1 0 0 0 0 0 0 0 0]; d=[1 0 1...

más de 2 años hace | 0

Respondida
error when copying contents of uitable
Use curly braces to access the contents of a cell array. s = {1 2 3; 4 5 6}; cname={'col1','col2','col3'}; size_s = size(s)...

más de 2 años hace | 0

Respondida
3D plotting of boxes using coordinates in CSV file
solutionData = [ ... 4 0 0 0 0 15 0 0 0 20 0 15 20 25 0 0 25 15 0 25 0 20 25 15 20; ... 2 25 0 0 25 18 0 25 0 12 25 18...

más de 2 años hace | 0

| aceptada

Respondida
Can anyone elaborate About MATLAB?
https://www.mathworks.com/products/matlab.html https://www.mathworks.com/products/matlab/programming-with-matlab.html https://...

más de 2 años hace | 0

Respondida
create cell from array with specified size
mymatrix = (1:24).' specified_size = 4; assert(mod(numel(mymatrix),specified_size)==0, ... 'numel(mymatrix) is not a mu...

más de 2 años hace | 0

Respondida
plot(fit, 'Style', 'Contour') resolution when using larger grids?
You can specify XLim and YLim in the plot() call, and doing that gives you the higher resolution contour. The problem then is th...

más de 2 años hace | 1

| aceptada

Respondida
how to use arrayfun
TradeF = Eq.data(r1);

más de 2 años hace | 0

| aceptada

Respondida
how to display a grayscale image in a monochrome color (other than white)
Like this? imagedata = randi([0,65535],512,512,'int16'); % random 512-by-512 int16 matrix figure; imshow(imagedata,[]) cm...

más de 2 años hace | 2

Respondida
How to replace elements of one dimension of an n-D matrix based on values in the same dimension of another n-D matrix of equal dimensions?
Here are a few alternatives: 1: One-liner using linear indexing in x: x(floor((find(y(:,1,:)==1)-1)/size(y,1))*prod(size(y,[1 ...

más de 2 años hace | 0

| aceptada

Cargar más