Answered
Trying to create a Haaland function to find friction factor inside a loop.
See this page on how to create a function. Functions can be used anywhere in your code, but they must be defined at the bottom ...

5 years ago | 1

Answered
Matlab Online workspace doesn't load
Did it just stop working or has it never appeared for you? You could try resetting your session. Follow the instructions found ...

5 years ago | 1

Answered
Matlab live script wont simplify my final answer which includes pi
What version of MATLAB are you using? Have you declared anything symbolically? When I run your code here, it returns 0.1 mdot ...

5 years ago | 0

Answered
I want academic use license to use to run modern solver such as gurobi
https://www.mathworks.com/products/get-matlab.html

5 years ago | 0

Answered
Adding a Callback to a Button to import data onto a plot
You import it to the workspace, not the axis. Once you've created variables with your data, say X and Y, then plotting is as sim...

5 years ago | 0

| accepted

Answered
Code with Switch case and if
A switch statement looks for the case that is true. The conditional for each of your cases returns a true/false value. This mean...

5 years ago | 0

| accepted

Answered
Changing the name of textbox (App Designer)
No. I would compare this to changing the name of a function while your code is running. Can you describe what it is you are try...

5 years ago | 0

Answered
mat file cannot be opened in R2015a
It appears you are using a class that is not supported in R2015a. For what it's worth, I can't open it in R2016a either. I don't...

5 years ago | 0

Answered
how to label second x and y axes
Use the following syntax with hAx(2) as your target. xlabel(target,txt) plot(1:100) xlabel('x1') ylabel('y1') hAx(1)=gca; ...

5 years ago | 0

| accepted

Answered
Re-range gray color level from 0-192 in contourf plot
I think you want caxis. Note this will rescale your colormap, meaning the darkest color will now be associated with 192 instead ...

5 years ago | 0

| accepted

Answered
How can I plot a table with data and time ?
What data type are you using to store your times? If you make it a duration, it will work. time = ["00:14:49"; "00:29:49"; "00:...

5 years ago | 0

| accepted

Answered
write a row from excel to a text file
It's possible, but you have to bring the data into MATLAB first, then write it to a text file. https://www.mathworks.com/help/m...

5 years ago | 1

| accepted

Answered
Selecting a sheet from an excel file in Matlab GUI
Uigetfile lets you select a file. I suggest using readmatrix or readtable, which allow you to specify which sheet to import usin...

5 years ago | 0

| accepted

Answered
30-day free matlab
If your 30 days trial has ended, the next step is to purchase a license. See here.

5 years ago | 0

Answered
My program doesn't write data to file
Works for me. What do you mean by "this program doesn't work"? Do you mean it's not creating the file, or the file contents are ...

5 years ago | 0

Answered
why I get an error
You haven't told us what the error is, nor how you called your function. Take a second to go through the examples in this docum...

5 years ago | 0

| accepted

Answered
index exceeds the number of array elements
The error message is telling you the issue. Somewhere in your code, you are indexing an array using an index value greater than ...

5 years ago | 0

Answered
How to show graph plot in app.UIAxes?
This may be version-specific issue. Your code works fine in R2021a. I don't have R2016a installed to test. I did test it in R201...

5 years ago | 0

| accepted

Answered
Converting rows to columns
You'll have to be careful. Each column of a table can be a different data type, but all data in a column must be of the same dat...

5 years ago | 0

Answered
How to make a program repeat a script
Sounds like you need a loop. There are two type - for and while. If you know the number of times you want to loop through your c...

5 years ago | 1

| accepted

Answered
Urgent help needed for signal processing problems
MATLAB Onramp is a good place to start. I suggest Chs 4, 6 and 9 at least. You may also want to consider looking at our free S...

5 years ago | 0

Answered
How to solve the error 'Row index exceeds table dimensions'
You haven't shown us the size of your table, which would be helpful given the error message you are getting. My suspicion is tha...

5 years ago | 0

| accepted

Answered
I can't show ColorVariable on geobubble
Why is removecats not an option? B = removecats(A) removes unused categories from the categorical array, A. The output categor...

5 years ago | 0

Answered
Is there a way to read a .pf file also known as picture floatmap file?
I found this document, which suggests your file is not a valid pfm file. Specifically The PFM header is 3 consecutive "lines" ...

5 years ago | 1

| accepted

Answered
I can't figure out how to write in excel using if statements
Look into readtable and writetable. They are now preferred. I think one of your issues is that that Score is a vecor of numbers...

5 years ago | 0

Answered
Assign variables and id
A solution really depends on what you are trying to achieve. If you want to use c1, c2, etc to refer to a row of values, conside...

5 years ago | 0

| accepted

Answered
How do I switch x axis by y axis without using 'view'?
Specify your x values as your y values, and vice versa plot(dd,1:length(dd),'b') hold on plot(dd_MC,1:length(dd_MC),'r')

5 years ago | 0

| accepted

Answered
How to avoid Warning when assigning values to a table
The warning is because you are adding the values to a table one by one. When you add the first value in a new row, all columns a...

5 years ago | 0

| accepted

Answered
Stair Plot Beginner Problem
Look into the square function. Consider adding two waves together to create the waveform shown.

5 years ago | 0

| accepted

Answered
Selection of logical data
Use logical indexing.

5 years ago | 0

Load more