回答済み
Generate surface from boundary points
x = linspace(0,3,6).'; y = linspace(0,1,6).'; nx = numel(x); ny = numel(y); zx = 0.134+0.007*rand(nx,2); zy = [zx(1,1) ...

9日 前 | 0

回答済み
How to combine two plots in same figure with axis break?
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is a program for 1-D Photonic crystal...

9日 前 | 0

| 採用済み

回答済み
How to align textbox in matlab plot?
"Is it possible that I can put all the six textbox in the same position of the respecitve graph?" Yes. Here's an example that p...

10日 前 | 0

回答済み
Help with code running for each value of a vector
"how to get a function to run through all values of a vector" Use a for loop with Nsnr iterations, where Nsnr is the number of ...

10日 前 | 0

| 採用済み

回答済み
how does this work some clarification
This is the part of the solution that's relevant to solving the problem: tf = ~isempty(regexp(n_str(end),'[02468]')); The way ...

10日 前 | 1

| 採用済み

回答済み
adding individual points using scatter in a grouped bar graphs
S1 = [41 55]; S2 = [34 26]; P1 = [64 55 38 41 45 47]; P2 = [90 34 51 54 65 52]; mpi1 = [mean(S1) mean(P1)]; mpi2 = [mean(...

11日 前 | 0

| 採用済み

回答済み
Why did I this error Error in Matlab_Partical_fig1 (line 43).
function pushbutton2_Callback(hObject, eventdata, handles) Ft = B ; B is not defined in that function. B is defined in the ma...

11日 前 | 0

回答済み
How Do I dowload a file from Amazon S3?
Once you have your environment set up, you should be able to treat files on S3 as you would treat any local file, e.g., rawdat...

11日 前 | 0

回答済み
large errorbars on semilogx
What you see is because of the log XScale: Partial errorbars: If the left endpoint of the errorbar would be <= 0, it is not ren...

11日 前 | 0

回答済み
arrow on vertical line doesn't look vertical
You can get problems like those when the annotation is in an axes, which doesn't appear to be officially supported. Note that on...

11日 前 | 0

| 採用済み

回答済み
Polar Axis with Specific Jumps
ax = polaraxes( ... 'RLim',[0 1], ... 'RTick',linspace(0,1,21), ... 'ThetaAxisUnits','radians', ... 'ThetaLi...

11日 前 | 1

回答済み
How to extract data from a file, and form a column vector?
See the attached test_modified for one way to do that. test_modified

11日 前 | 1

| 採用済み

回答済み
ask about random matrix
% number of rows: N = 8; Here are some example random matrices where each row has one element, which is what you asked for: r...

11日 前 | 0

回答済み
Vectorization of an if condition with cirle function
Use logical indexing. Something like as follows: % make up missing variable values: nz = 20; nx = 24; dz = 0.1; dx = 0.1; ...

11日 前 | 2

| 採用済み

回答済み
How to get 3 different plots in 1 plot axes using drop down button followed by analyse button in GUI?
Prompt the user to select the file (e.g. by calling uigetfile) _only_ in the callback of the button the user clicks to select a ...

11日 前 | 0

回答済み
Mapping issue with pcolor()
The discontinuity in lon where it changes from +180 to -180 causes the problem with pcolor, which you see as the blue streak in ...

12日 前 | 2

| 採用済み

回答済み
Interpolating between two columns in a matrix
% generate a matrix with NaNs like yours: M = rand(10,10); M(randi(100,1,40)) = NaN % fill the NaNs using linear interpolatio...

12日 前 | 0

| 採用済み

回答済み
Unexpected MATLAB expression.
On line 5, use 5*y instead of 5y

12日 前 | 0

回答済み
How to create a GUI in matlab where the user can select a single testcase he wants to run?
I misunderstood the situation before; I thought you were running a script from an app, not the other way around. If all you nee...

13日 前 | 0

| 採用済み

回答済み
How to build a graph using stem for a given equation?
Your delta function makes d a scalar. Instead d should be the same size as n, with value 1 where n is 0 and value 0 everywhere e...

13日 前 | 1

| 採用済み

回答済み
producing an error message based on response in prompt message box
prompt = {'Enter Figure Type:','Enter Output Type:'}; dlgtitle = 'Input'; fieldsize = [1 45; 1 45]; answer = inputdlg(prompt,...

13日 前 | 0

回答済み
Incorrect rendering of legend in an error bar plot having both verticle and horizontal error bars.
The basic problem is that you are creating more errorbar objects than you are making legend entries for. The solution is to make...

13日 前 | 0

回答済み
Index in position 2 exceeds array bounds.
load Pr_error_2 "how can I delete all the rows that without data inside?" Like this: empty_idx = cellfun(@isempty,Pr_error_2)...

13日 前 | 0

| 採用済み

回答済み
Having a "dot indexing is not supported for variables of this type." error
imds is the character vector 'daspics': imds =('daspics'); (the parentheses do nothing in that context and are unnecessary) Y...

13日 前 | 1

回答済み
How to get a msgbox with several lines of texts showing different variables?
msg = sprintf('Total files processed: %d\nElapsed Time: %.2f', numel(S), toc); l = msgbox(msg);

13日 前 | 0

| 採用済み

回答済み
Matrixwise subtraction yields vector - how to reshape to original logical matrix?
A_temp = A; B_temp = B; idx = A >= 0.5; A_temp(~idx) = NaN; B_temp(~idx) = NaN; result = mean(A_temp-B_temp,1,'omitnan');

14日 前 | 2

回答済み
How to import text data with different column lengths without having NaN
Here's a method you may find useful: Read the file into a table: T = readtable('test.txt') Then convert table into a scalar s...

14日 前 | 0

| 採用済み

回答済み
How can I add rumble strips in roads?
https://www.mathworks.com/help/roadrunner/ref/roadcrgtool.html

14日 前 | 0

| 採用済み

回答済み
How to find a sequence from a txt file?
The use of strfind here is not correct: % Read the DNA sequence from the file dna_sequence = strfind(fileID, '%s'); It looks ...

14日 前 | 0

| 採用済み

回答済み
Matrix dimensions must agree
% Parameters numVehicles = 50; % Number of vehicles numEdges = 3; % Number of edge computing nodes numC...

14日 前 | 0

| 採用済み

さらに読み込む