Réponse apportée
App Designer - Edit grayed out code
Copy the whole code app designer produced and past it another blank .m file and save it. Then you can edit the properties, con...

plus de 7 ans il y a | 0

Réponse apportée
plotting, tools and fitting
Try to define the axis handle inside the figure. Than hold it: hFig = figure; hAxis = axes(hFig); hold(hAxis,'on') plot(hAx...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
How do I delete a row in a table containing certain text?
Hi Nina, You can use this code below: myTable = table({'2017','2018','2019','Total:'}',[35216284,36432973,37895599,428730614]...

plus de 7 ans il y a | 3

Réponse apportée
Is there a function like string2double that can handle a numerical input?
You can do it first convert to string then convert to numeric: str2num(string(2)) str2num(string('2')) Both gives you numeric...

plus de 7 ans il y a | 1

Réponse apportée
How to go from if..end to switch..end?
Hi Dinis, Is that what you are looking for? soma=0 for j=1:5 switch j case 2 continue...

plus de 7 ans il y a | 1

| A accepté

Réponse apportée
How to create a matrix from 2 matrices with specific values
Hi Ivas, Outer join of tables would help but you should define a rule or a condition that how to choose when we have multiple ...

plus de 7 ans il y a | 0

Réponse apportée
Matlab program to draw cubes.
Have you ever checked the file exchange? This link might help you: plotcube Try to put alpha variable 1, and it only shows the...

plus de 7 ans il y a | 0

Réponse apportée
My color map and color bar are not representing the same colors?
It is because your values are close to 0 but you set colorbar limit from [0 1]. That below set would work but I personally don'...

plus de 7 ans il y a | 1

Réponse apportée
plotting a set of irregular data points
Hi, You can use scatter3 function to create a 3D scatter plot. Check the link: scatter3 For coloring the intensity search f...

plus de 7 ans il y a | 0

Réponse apportée
Extract necessary fields values from .mat; Combining coordinates.
Hi Vktor, Try this below: outPutCellArray = cell(numel(myStruct),2); for i = 1:numel(myStruct) outPutCellArray{i,1} = mySt...

plus de 7 ans il y a | 1

| A accepté

Réponse apportée
App Designer: How to delete items from listbox?
Hi Marie, Below code will delete your corresponding item. function ButtonPushed(app, event) [~,idx] = ismember(...

plus de 7 ans il y a | 3

| A accepté

Réponse apportée
How to attribute vectors from a matrix some proprieties?
Hello Victor, You can try below code. Please read my comments. I hope it helps. n = 4; a = randi(10000,n,1); % creates ra...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
load and do operations on multiple file in a loop
Hi Dipen, As far as I understand you want to read all the files in a specific folder with a for loop and do the calculations. ...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
whats wrong with this code?
Try this below: function where_is_solution_required(lit_kolonne) form_uten_tiltak = 'SANDSTEIN'; for k=1:numel(lit_kolonn...

plus de 7 ans il y a | 0

Réponse apportée
how to view content of my cell table
Try this in the last section: %creates the table temp = newTable.values; bigTable = []; for i = 1:numel(temp) bigTable =...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
How can I display result of my program in a table GUI?
Hi, Just check the uitable function. A sample for uitable creation is below: hfig = figure; % this will be your GUI figure ...

plus de 7 ans il y a | 1

| A accepté

Réponse apportée
Is it possible to write to an excel spreadsheet without opening excel?
Hi, Did you tried writetable or xlswrite functions and they did not work? writetable has a property: UseExcel and you can set...

plus de 7 ans il y a | 0

Réponse apportée
setting two legend for two function
Moslem, You can try this below, it is a little bit tricky to add legend to axis handle as parent. Then add other legend. See m...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
Explode cell that are into another cell
I was assuming the same 64x9 cell. Here is my solution gives the same result with Jan's: cellArray = cellfun(@(x) strsplit(x(...

plus de 7 ans il y a | 0

Réponse apportée
How do I add/create an interactive 3D plot on a MATLAB GUI?
Hi Joshua, You can try below code: You should create a panel, or an axes in some position and then add your plot to that conta...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
could anyone help me to overcome the error stating RESHAPE the number of elements must not change.
Actually the error gives you the hint. The number of elements inside the array should be equal to multiplication of dimensions. ...

plus de 7 ans il y a | 0

Réponse apportée
How to use a pushbutton in a loop in GUI matlab
Hello Kavindu, I was working on the same topic as you asked above and I found a solution with some research. I made a demo te...

plus de 7 ans il y a | 0

Réponse apportée
3D Normal distribution plot for 2 random variable
Hello Gun Gu, You can use surf function to do that plot. Here is the link: surf Also you can look at below function in file...

plus de 7 ans il y a | 1

Réponse apportée
Pass data directory input argument to a set of unit tests
Hi Ariel, You can't define a class and a function which is not a method of the class in the same .m file. Please read belo...

plus de 7 ans il y a | 0

Réponse apportée
how to convert cell 10X8 to mattrix and matrix 10X8 to to 8 bit value [1,1,1,1,0,0,0,0]
Hi, Just try this: v = logical(digit_ms1 - '0'); % if you want bits logical use logical otherwise it will give you double a...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
How to put spaces between the elements inside a char array
Try this below it might help: format_data = '%6.3f%6.3f%6.3f%6.3f%6.3f%6.3f%6.3f%6.3f'; format_data = strrep(format_data,'%...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
close all hidden problem
Did you type those inside a function or in the command window? h=figure(5); figHandles = get(groot, 'Children') For example,...

plus de 7 ans il y a | 1

| A accepté

Réponse apportée
How to convert string to variable name ?
Hi all, I agree with Jan & Stephen what they said about eval function. Don't use it. Instead use struct and arrays with dynami...

plus de 7 ans il y a | 10

Réponse apportée
Importing data from different excel sheets and many excel files (csv files)
Hi CoCo, You can try this below. I made some comments also. fPath = 'C:\Users\...\Desktop\excelsFolder'; % filepath of your ...

plus de 7 ans il y a | 0

| A accepté

Réponse apportée
Polynomial Approximation, is it possible in matlab?
Hi, Try below (it uses least squares): For lagrange you can look at that link: lagrangepoly x1 = 1; y1 = 3.5; x2 = 2...

plus de 7 ans il y a | 1

Charger plus