回答済み
Big table with zero
for an array, say: a = 1 0 0 1 0 1 1 1 1 0 0 1 you can just do: ...

2年以上 前 | 0

| 採用済み

回答済み
get value from uicontrol editbox
You either set a callback function for that edit box, that will be triggered whenever the user hits the enter key, edit = uicon...

2年以上 前 | 0

| 採用済み

回答済み
Improving the fitting of data
the polyfit and polyval functions will help you here: https://www.mathworks.com/help/matlab/ref/polyfit.html also, just for th...

2年以上 前 | 0

回答済み
i have an idea that idk if i can do on matlab
yes! doable on matlab :)

2年以上 前 | 0

質問


Improve figure update speed with WindowsButtonMotionFcn
Hi all, I have a WindowsButtonMotionFcn defined to essentially move a lineobject on my axes to where my cursor is. Unfortunate...

2年以上 前 | 0 件の回答 | 0

0

回答

回答済み
Indices on the left side are not compatible with the size of the right side error
M=[]; theta=linspace(0,180,401); x=linspace(0,10,501); for i_theta = 1:length(theta) for i_x = 1:length(x) M...

2年以上 前 | 1

回答済み
How to check the output
you've defined the function to be: function A = warmUpExercise() so the output is going to be whatever A is defined to be in t...

2年以上 前 | 0

| 採用済み

回答済み
Using a drop down menu or pushbuttons to display graphs
does this work for you? function PlotType(src,event) val = src.Value; str = src.String; if strcmp(src.Stri...

2年以上 前 | 0

回答済み
How do I show the for loop results over time?
n = 100000; %number of trials score = zeros(n,2); % first column is player 1, 2nd column is player 2 for i = 1:n p1 = ran...

2年以上 前 | 0

| 採用済み

質問


How to make functions outside of Class folder hidden from access
Hi all, I have a class folder, we'll call class1. class1 contains properties and methods, both hidden and not. To access thes...

2年以上 前 | 1 件の回答 | 0

1

回答

回答済み
inconsistency when comparing cell arrays with strings vs char array
'abcd' is considered a 1v4 char. "abcd" is considered a 1x1 string

2年以上 前 | 0

回答済み
How do I use the OR "||" operator in an 'if' statement on multiple possible strings?
I would suggest using switch / case, it's a lot more intuitive to look at: for i = 1:length(Names) switch Names(i) ...

2年以上 前 | 1

| 採用済み

回答済み
How to detect certain values within the data?
%let M be your 860*920 matrix number = 2; %value you are looking for total_count = sum(sum(M==number)) no loop needed

2年以上 前 | 0

回答済み
How to find these features for large number of data?
i'm not sure how you're storing each datasheet, but if they are all in cell arrays (1 x 80 cell array, where each cell array is ...

2年以上 前 | 1

| 採用済み

回答済み
Write a program to add first 15 numbers but stop the program when the sum exceeds 90 using break statement.
https://www.mathworks.com/help/matlab/ref/randi.html https://www.mathworks.com/help/matlab/ref/while.html https://www.mathwork...

2年以上 前 | 0

回答済み
Creating a matrix from a lagrer matrix
A = reshape(1:15,5,3); %reshaped into a 5x3 matrix. B =A(:,1); %one of the column vectors that you desire reading up on indexi...

2年以上 前 | 1

回答済み
Identifying the length of a timeseries
Sounds like the information is stored within a cell array. try doing bracket notation: size(data{:})

2年以上 前 | 1

| 採用済み

回答済み
How to call a function with a vector?
if you are multiplying or dividing vectors, include the element-wise operator .* %multiplication ./ %division example docume...

2年以上 前 | 1

回答済み
Iteratively using 2 For Loops to create 4 data sets
You dont seem to be doing any sort of indexing with CompOPR. so every loop iteration is the same. for example, I think you mea...

2年以上 前 | 0

回答済み
Display two figures in two different axis using matlab gui
what you can do is assign a tag to your axes when you create them, and point back to them in your callback functions. here's an...

2年以上 前 | 0

| 採用済み

回答済み
Rotation of the title of the plot
Get the handle of the axes, and access the title > rotation property. Here's an example you can run: f = figure; a=axes; %axes...

2年以上 前 | 0

回答済み
use for loop to call the function 600 times
friction= 0.1 : 0.05 : 0.65 initial_elevation= 100 : 15 : 200 rows = numel(friction); col = numel(initial_elevation); v_a =...

2年以上 前 | 0

回答済み
How to put a matrix into an cell element?
new_M = cell(1,size(inputs2,1)); for i = 1:size(inputs2,1) new_M{i} = inputs2{1}(i,:) end

2年以上 前 | 0

回答済み
How to create a set of 50,000 numbers with specific step size
how about this alternative? step = 0.1 %whatever step size you want r = randi([1 100],1,100) %this generates 100 random intege...

2年以上 前 | 0

回答済み
Plot markers as a continuous line
try this : [new_x, ord] = sort(x); new_y = y(ord); plot(new_x,new_y,'r-') let me know if this helped

2年以上 前 | 0

回答済み
Creating a function that outputs a polynomial
tip: When you create a new function on matlab (right click directory>new file > function), it looks something like this: functi...

2年以上 前 | 0

回答済み
Is there any function for calculating the size of a position vector in matlab?
use the norm() function. example: norm([1 2 3]) ans = 3.7417

2年以上 前 | 0

回答済み
How to create variable to use on more than one function in App Designer?
https://www.mathworks.com/help/matlab/creating_guis/share-data-across-callbacks-in-app-designer.html you can store values in th...

2年以上 前 | 0

| 採用済み

回答済み
how to cause a change in the colour of a push button every time it is pressed ?
function pushbutton1_Callback(hObject, eventdata, handles) % hObject handle to pushbutton1 (see GCBO) % eventdata reserved...

2年以上 前 | 2

| 採用済み

回答済み
Extract data from array at set intervals to new array
you can use indexing. y(1:23:end)

2年以上 前 | 0

| 採用済み

もっと読み込む